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);
but it says that Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource
seems like you're using the mysql-functions.
mysql_num_rows, wich is what you're using, returns the length of your result set (for SELECT-Statements for example). what you need to use is
mysql_affected_rows (as already said).