Mysqli -> delete

The query is indeed valid. Telling the database to delete all Bananas from your table is still a valid command if there are no Bananas. The database simply does nothing, and has complied with your command.

What you can check is the number of affected rows to see if the database did anything.

2 Likes