Hi all,
Everytime a script on my site runs, I want to add '1' to a certain field in my database. At the moment the following code is supposed to cover that:
$newviews = $rowresult[views] + 1;
// update views
mysql_query("UPDATE games SET views='$newviews' WHERE id='$rowresult[id]'");
Strangely though, instead of adding 1, 2 is added to the original figure. Could anyone explain why this could be happening?
Thanks,
Mike