mysql_query("UPDATE images SET rating=1 WHERE id = '$row[id]'");
I just replied to your other post below, which is basically the same question...
Diego