Fejl: You can't specify target table
mysql_query("DELETE FROM $DB.debate WHERE topic=2 && thread_id NOT IN (SELECT thread_id FROM $DB.debate WHERE topic=2 && id!=thread_id)")or die(mysql_error());You can't specify target table 'debate' for update in FROM clause
