I’m trying t remove a follow-relation in my database. I want with one query execute a code that removes both the one I follow, and also in the opposite direction. I’ve got the following code that has a syntax error:
//profileId is the current user and contactsProfileId which user he/she follows
$sql = "
DELETE FROM contactlists
WHERE (profileId = '$profileId AND contactsProfileId = '$contactsProfileId')
OR (profileId = '$contactsProfileId' AND contactsProfileId = '$profileId')
";
You forgot to add closing ‘ single quote for
$profileId.Try this