Jump to content

Incrementing value in database.


heldenbrau

Recommended Posts

Is there a quick way to increment a value in a database.

 

I want to count how many times users go to certain pages.  So when somebody clicks the page, a php script connects to the database and adds 1 on to the number.  The only way I know how to do it is to connect to the database, search the table for this page and get the number of times it is viewed, then update the table.  So 2 queries, is there a way to do it in one?

Link to comment
https://forums.phpfreaks.com/topic/218849-incrementing-value-in-database/
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.