I have it:
$query="DELETE FROM classified, $sql_table WHERE classified.ad_id = '$id' AND classified.classified_id = $sql_table.classified_id AND classified.poster_password='$pass'";
I get this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE classified.ad_id = 'Bmw_M3_E46_Full_29920' AND classified.cla' at line 1
Any help?
As you can see, $ sql_table is bound to a declaration table with fields. classified_id
I need to attach DELETE somehow.
A basically classified table is a main table, then each category has its own tables with data about vehicles. the classified table has a field called split_id that matches the name
Here is the complete request:
DELETE FROM classified, vehicles WHERE classified.ad_id = 'Bmw_M3_E46_410811305' AND classified.classified_id = vehicles.classified_id AND classified.poster_password='some_password'
Why is this not working? Should it be so hard to remove from multiple tables?
thank
user188962
source
share