Goldfiles
02-08-2008, 07:52 PM
I need to do a double query, where one is embedded in the other. I am not sure how to format this code near the bottom.
$sql = mysql_query("UPDATE table SET valueA = 'hello'
WHERE ValueB = '2'
AND ValueC = '3'
AND ValueD IN (SELECT ValueD FROM NewTable)");
I don't believe an UPDATE can use a JOIN....may be wrong on that. So, I am trying to use an embedded query like I have above with the "IN" keyword. How do I format that exactly? Thanks.
$sql = mysql_query("UPDATE table SET valueA = 'hello'
WHERE ValueB = '2'
AND ValueC = '3'
AND ValueD IN (SELECT ValueD FROM NewTable)");
I don't believe an UPDATE can use a JOIN....may be wrong on that. So, I am trying to use an embedded query like I have above with the "IN" keyword. How do I format that exactly? Thanks.
