Jump to content

[SOLVED] SQL Math ://


jscix

Recommended Posts

mysql_query("UPDATE `attend` SET total=(total+1), ip='$curIP' WHERE attend.eid = $eventid");

 

As long as attend is the table name, this should work. You have to remember that varchars need single quotes or any string, and to put math problems in parans just to be sure it produces the right result.

Link to comment
https://forums.phpfreaks.com/topic/46497-solved-sql-math/#findComment-226232
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.