The context is"
$result=mysql_query("UPDATE sometable SET somecolumn=3);
$howManyRows=mysql_affected_rows();
The error is telling you that $result isn't working.
My guesses:
There's a problem with your query, but the error isn't being captured and displayed by your code. "If($result){
$howManyRows=mysql_affected_rows($result);
}else{ echo "this didn'twork";}"
Most likely, you're trying this function with a SELECT statement,
and you really want to use mysql_num_rows();
From the PHP manual:
mysql_affected_rows() returns the number of rows affected by the last INSERT, UPDATE or DELETE query associated with link_identifier
mysql_num_rows() returns the number of rows in a result set. This command is only valid for SELECT statements. To retrieve the number of rows affected by a INSERT, UPDATE or DELETE query, use mysql_affected_rows().