0

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 hence not deleted)?

Community
  • 1
  • 1
David19801
  • 11,214
  • 25
  • 84
  • 127

3 Answers3

0

Use mysql_affected_rows().

ThiefMaster
  • 310,957
  • 84
  • 592
  • 636
0

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.

Vladislav Rastrusny
  • 29,378
  • 23
  • 95
  • 156
0

Don't use the error code. Call mysql_affected_rows.

Oswald
  • 31,254
  • 3
  • 43
  • 68