Jump to content

Increase A Number In A Database On Click


beennn

Recommended Posts

Do you mean to increase the number in one record or to increase an ID for a new record?To increase the value in a record:

UPDATE table SET field1 = field1 + 1 WHERE field2 = 'value'

If you want to increase the value for each record, create a table with AUTO_INCREMENT.

Link to comment
Share on other sites

Well, the query I showed you will do that. If you have a database, I'm sure you know how to connect and send queries to it, and that you have an understanding of SQL syntax.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...