How can I determine if a record has been deleted without running a select query first?
Code:delete from `markers` where id = n
How can I determine if a record has been deleted without running a select query first?
Code:delete from `markers` where id = n
Last edited by bluewalrus; 07-20-2011 at 04:31 AM.
Corrections to my coding/thoughts welcome.
use mysql_affected_rows() afterwards (1 means it was deleted, 0 means it wasn't (for whatever reason - didn't exist, mysql error, etc.)).
bluewalrus (07-20-2011)
Nice, thanks wasn't aware of that function. I should probably go through the available mysql functions.
Corrections to my coding/thoughts welcome.
Bookmarks