It sounds to me that a trigger would help, but mysql doesn't has them yet. Adolfo
> -----Original Message----- > From: Paul DuBois [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 03, 2003 8:04 PM > To: Kevin; [EMAIL PROTECTED] > Subject: Re: auto increment question > > > At 15:28 -0800 1/3/03, Kevin wrote: > >Hello, > > > >I have a table with an ID column and a viewed column. I > would like the > >viewed column to increment by one each time the row is updated. > > > >Stats > >======= > >ID > >views > > > >is this possible? > > Sure. Since you're updating the row anyway, set the column > value to one more than its current value. :-) > > No, it won't happen automatically, which I would guess is > what you're really asking. > > > > >-k > > > >sql, query > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php