What does a successful MySQL DELETE return? How to check if DELETE was successful?

前端 未结 4 741
天涯浪人
天涯浪人 2020-11-27 16:45

Using PHP, I am trying to delete a record, but I want to check if it was successful or not. Is anything returned from a successful DELETE FROM foo where bar = \'stuff\

4条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 17:29

    For other types of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, mysql_query() returns TRUE on success or FALSE on error.

提交回复
热议问题