Yes you have neither triggers or stored procedures. Instead you'll have to remember to use the same code everywhere in your app that can update the table:
Update mytable SET col1 = 'somevalue', col2 = 3456, col3 = now(), Viewed = Viewed + 1 hth, Arthur ----- Original Message ----- From: "Adolfo Bello" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 03, 2003 7:15 PM Subject: RE: auto increment question > 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 > --------------------------------------------------------------------- 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