You are here: Re: multiple updates « PHP SQL « IT news, forums, messages
Re: multiple updates

Posted by Tom on 12/12/06 18:47

On Tue, 12 Dec 2006 15:50:56 +0100, ulyx wrote...
>
>How to update multiple values ?
>e.g.
>UPDATE user SET name='$name' WHERE id='$id' "
>
>This will update just one field.
>How can i update multiple fields ( lastname, city ) on this way ?
>
>

You would separate them with a common, such as...

update user set name='$name', col2='$val2', col3='$val3' WHERE id='$id';

If you had multiple tables then you would need multiple updates, one for reach
table.

Tom
--
Help a Community by Participating in Ours
We donate your subscription fees to the charity you choose
100% of your first month, 10% thereafter.
newsguy.com/charity.asp

 

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

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