Jump to content

Mysql help


rascle

Recommended Posts

Hi

I am using the following code:

$id = $game['gamenumb'];

mysql_query("UPDATE games SET hits = hits+'1'

WHERE gamenumb = $id");

 

which, when a page is viewed the code will +1 to a row in a MySQL db. However for some reason it is adding 2 instead of 1? Does anyone know why this is?

Thanks

 

Link to comment
https://forums.phpfreaks.com/topic/193675-mysql-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.