Page 1 of 1

Simply counting

Posted: Tue Sep 16, 2003 9:02 pm
by EricS
I'm working on a PHP script that writes hits to a MySQL database. Is there a single MySQL command that will automatically increment a number in a row?

If not, is it more efficient to look a row up add a number to it and then update that row or is it better to just add each row as a hit and then using a scheduled event, tally the rows up.

Posted: Tue Sep 16, 2003 9:10 pm
by Unipus
update table set row = row + 1;