Connecting Tech Pros Worldwide Help | Site Map

Auto Increment a record

nathj's Avatar
Expert
 
Join Date: May 2007
Location: North Tyneside
Posts: 854
#1: Aug 7 '07
Hi,

I was wondering iof there was a way to autoincrement a single field and row.

I have a table with a column called loginCount. Everytime the user logs in to my site I want this to go up by one. This is an update to the row, and does not involve adding a new row.

What I am doing at present is selecting the field out of the table using relevant creiteria and adding 1 to it as I do. Then I use this value to update the record asudate other sections of the record.

Is there a better way to do this?

Cheers
nathj
Reply