Check mysql_query results if DELETE query worked?

Posted by Camran on Stack Overflow See other posts from Stack Overflow or by Camran
Published on 2010-06-03T13:34:13Z Indexed on 2010/06/03 13:34 UTC
Read the original article Hit count: 110

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about php

Related posts about sql