With php/mysql how can i get the number of rows that a query affected?
what i tried so far:
$result = mysql_query($q); mysql_num_rows($result);
clamp,
you need to supply a resource to mysql_affected_rows, not a result record. See the links that the others have posted for additional information.
mysql_affected_rows
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); $result = mysql_query($q); echo mysql_affected_rows($link);