This site covers left joins with updates:
http://www.keithjbrown.co.uk/vworks/mysql/mysql_p5.php
<quote from site>
UPDATE cds LEFT JOIN artists
ON cds.artistID = artists.artistID
SET cds.title = 'A Funk Odyssey',
artists.name = 'Jamiroquai'
WHERE (cds.cdID = '2');
</quote>
Pat
www.gypsyfarm.com
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of
Pete
Sent: Sunday, August 06, 2006 10:33 AM
To: [email protected]
Subject: [php_mysql] INNER JOIN - sometimes...
What is the correct query that I should be using? I have got
"UPDATE sitemap INNER JOIN sales ON sitemap.smpItem=sales.salID SET
sitemap.smpDate=sales.salUpToDate"
And I want to add, the following
"WHEN sitemap.smpSite=1
AND sitemap.smpPageName='gen'
AND sales.salUpToDate>='2006-08-01";
but I can't figure out the syntax!
MySQL V4.1.19 standard
--
Pete Clark
[Non-text portions of this message have been removed]
The php_mysql group is dedicated to learn more about the PHP/MySQL web database
possibilities through group learning.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php_mysql/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/