I think I can make this question generic.
I have two tables relative to this question, one named users and one named orders.
Orders has a foreign key users_id in it which points back to the users table.
I want to (hopefully in one query) delete all users who do not have an order in the orders table.
I have mysql4.0 I believe and this query doesn't work. Any suggestions?
"DELETE FROM
users LEFT JOIN orders
ON users.id = orders.users_ID
WHERE
orders.id IS NULL"
Sam