I have this piece of code:
$sql = "update products
set
weight =\"$newdata\"
where weight = \"$olddata\" ";
$result = @mysql_query($sql,$db)or die("$sql");
$total = mysql_num_rows($result);
echo "$total";
I am trying to get the number of rows that were affected with the update but i am getting this error:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in ..........
What am i doing wrong here
Thanks for any help