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


drooh - 11:04 pm on Jul 5, 2011 (gmt 0)


This was exactly what I was looking for, this way I can re-use a portion of the query for inserting and updating.

Just out of curiosity at this point, is there a way to do something like this?

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


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