I have a DELETE query which deletes a record from a mysql db.
is there any way to make sure if the delete was performed or not?
I mean, for a query to FIND stuff you do
$res=mysql_query($var);
$nr=mysql_num_rows($res);
and you get nr of rows returned.
Is there any similiar method for deletion of records?
Thanks
Use
mysql_affected_rows(). It does not require the response as a parameter.Also, I like PDO better than the classic
mysql_functions. Just saying.