I have two conditions in a DELETE MySQL statement. But it does not delete the record.
$sql="DELETE * FROM sportevent.event_registrations WHERE event_registrations.id = '$id' AND event_registration.eventname = $event";
Is there something wrong with my query? It works if I use only one WHERE condition, but I need to use two.
I suspect this:
should be
After all, you’ve used the plural form in both the “from” clause and the other part of the “where”.
Also note that only one of your parameters is quoted – it’s not clear to me how you’re providing the parameters, but surely you should be consistent.