Number of affected rows can be obtained as per following.
/* this should return the correct numbers of deleted records */
mysql_query(‘DELETE FROM mytable WHERE id < 10’);
printf(“Records deleted: %d\n”, mysql_affected_rows());
MySQL Interview Questions and Answers
Number of affected rows can be obtained as per following.
/* this should return the correct numbers of deleted records */
mysql_query(‘DELETE FROM mytable WHERE id < 10’);
printf(“Records deleted: %d\n”, mysql_affected_rows());