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 rob on 10/02/00 11:32

Sure, increase it in the update query, example:
UPDATE hit SET counter+1 WHERE site='www.google.com'
(assuming that counter field is integer)

John McClumpha schreef:

> Hi there - just a quick query (pardon the pun)...
>
> 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?
>
> Thanks in advance
>
> --
> 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

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