|
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
[Back to original message]
|