You are here: Re: UPDATE and increment by 10 « PHP Programming Language « IT news, forums, messages
Re: UPDATE and increment by 10

Posted by Tim Martin on 12/16/88 11:57

> Ac1d^ wrote:
>> NTG, ...
>>
>> update my_table set field = (field+10);
>>
>> that should do.
>
version2 wrote:
> i am looking at resetting all the values in the column and giving the
> first value 10 htne 2 value 20 and so on

Why don't you start by explaining what problem you're trying to solve
with this? It smells like a nasty hack to me.

Assuming you already have the incremental numbers, you can do

UPDATE my_table
SET field=(field*10)

In addition, this has nothing to do with PHP. In future, you might want
to try comp.databases.mysql (or the appriate group for whatever DB you use)

Tim

 

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

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