开发者

mysql error code to check delete went through [duplicate]

开发者 https://www.devze.com 2023-02-19 13:14 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: What does a successful MySQL DELETE return? How to check if DELETE was successful?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

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

Hello,

If I run a delete query, what is the php/mysql error code returned if a row was actually found and deleted or not found (and h开发者_运维技巧ence not deleted)?


Use mysql_affected_rows().


You can examine mysql_affected_rows() for that. But there no function, that can tell you which specific rows were updated or deleted by previous DML statement.


Don't use the error code. Call mysql_affected_rows.

0

精彩评论

暂无评论...
验证码 换一张
取 消