You are here: Re: increase MySQL field value by 1? (quickly/easily) « All PHP « IT news, forums, messages
Re: increase MySQL field value by 1? (quickly/easily)

Posted by John McClumpha on 11/22/05 12:33

On Mon, 21 Nov 2005 16:45:34 -0500, Pat Farrell <pfarrell@nospam.com>
wrote:

>John McClumpha wrote:
>> is there a simple (quick) way to increase the value of an integer
>> field in a nominated row by 1 other than first having to retrieve the
>> value and then UPDATE the appropriate field? - similar to doing a
>> $Variable++ in PHP?
>
>Why not use the autoincrement feature of MySql?

because it won't do what I am after....

I'm using autoincrement on one field in that table (ID) - which is
serving the purpose well (i.e. when a new record is added it obtains
the next available integer for the ID field)... however what I am
wanting to do here is update a field and increase its value within an
existing record by 1

--
John McClumpha
Darkness Reigns - http://www.incitegraphics.com.au/darkness/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация