Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- Options for inserting and updating mysql


drooh - 6:34 pm on Jun 25, 2011 (gmt 0)


Is it possible to do something like this?

$sql = "UPDATE `test` SET (`name`,`age`) VALUES ('Sam','34') WHERE `id` = 10";

It would be nice because the insert command is similar

$sql = "INSERT INTO `test` (`name`,`age`) VALUES ('Sam','34')";


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4331051.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com