So I'm trying to run the following code to delete a record from a table when thhe customer ID is 100
DELETE FROM workoutplan
JOIN account ON workoutplan.Account_Username = account.Username
JOIN customer ON account.Customer_idCustomer = customer.idCustomer
WHERE Customer_idCustomer = 100
However I get the following error
[Err] 1064 - 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 'JOIN account ON workoutplan.Account_Username = account.Username
JOIN customer O' at line 2
* FROM workoutplan ...but your example shows onlyDELETE FROM workoutplan. Do you by chance haveDELETE * FROM workoutplanin your actual code?