on 2/3/02 3:36 PM, Lutz Brückner at [EMAIL PROTECTED] appended the following
bits to my mbox:

>> Question is how to properly form a LEFT JOIN using
>> UPDATE... I tried:
>> UPDATE product_price LEFT JOIN temp
>> SET product_price.product_price_vdate = 1 (del flag)
>> ON product_price.product_id = temp.product_id
>> WHERE temp.product_id IS NOT NULL

> I just read http://www.mysql.com/doc/U/P/UPDATE.html once more,
> but can not find anything about mysql supporting JOIN in UPDATE
> statements.

I believe Lutz is right.  You are using PHP, right?  Any MySQL?

Some RDBMS systems provide ways of linking database table records to each
other via foreign keys and others allow you to create triggers that are
performed by the database server when certain actions happen.

MySQL does not.  They believe the application programmer should take care of
those "application" pieces.

So, if you're using MySQL, do the select statement first with the join, then
loop through the results and perform the update.


    while ($self != "asleep") {

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to