PDA

View Full Version : Updating multiple tables


nadjavox
04-08-2004, 05:19 PM
Hi,

My webserver is running an older version of MySQL (3.23.56 ). I am trying to update a table based on criteria from two tables, and I can't seem to get the syntax quite right. Here is what I tried:

UPDATE (member, unit)
SET member.status_id = 3 WHERE member.unit_id = unit.unit_id AND unit.etime > 0

Does anyone know an older syntax to do this? Any help would be appreciated.

firepages
04-08-2004, 05:57 PM
AFAIK you cant do `UPDATE ... SELECT` in < MySQL5 which is essentially what you want to do