i have a mysql update statement but it return true when rows are updated and when no row is updated.
i want to knw if row was altered or not.
here is my query:
$q=mysql_query("UPDATE results set marks='$mark' and total='$total'
where result_id='$rid'");
if($q){
echo 'rows updated';
}
else{
echo 'No row was updated';
}
it always print the "row updated " message, whether no record updated or not.
any help plz?