mysql_query("UPDATE images SET rating=1 WHERE id = '$row[id]'");
Instead of changing the rating to " 1"I want to add the number "1" to the existing number. Any ideas?? Thanx!
try concatenating a "1" to the existing rating's field:
$newvalue = $row[rating]."1"; mysql_query("UPDATE images SET rating='$newvalue' WHERE id = '$row[id]'");
You want to increase rating by 1? Well, why didn't you just say so? 🙂
SET rating = rating + 1