Hi,
I'm trying to do:
My question is:
If after the DELETE runs on DB and before mysql_affected_rows() is called another DELETE or UPDATE, etc occur? Then mysql_affected_rows() its going to return the rows affected by this delete or by the last query to DB.
I found out that I can use Begin...end (
But I never did it, can anyone give me an example (if this is necessary to use).
Thanks
I'm trying to do:
Code:
$result = mysql_query("DELETE FROM `table` WHERE `field`='value'");
if (mysql_affected_rows()>0) {
//Run rest of code
}
My question is:
If after the DELETE runs on DB and before mysql_affected_rows() is called another DELETE or UPDATE, etc occur? Then mysql_affected_rows() its going to return the rows affected by this delete or by the last query to DB.
I found out that I can use Begin...end (
But I never did it, can anyone give me an example (if this is necessary to use).
Thanks