View Single Post
  #2 (permalink)  
Old April 20th, 2005, 12:33 AM
karlgg karlgg is offline
Registered User
 
Join Date: Apr 2005
Location: Anthony, New Mexico, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

One thing you'll want to make sure of, that you have MySQL 4.0.4 or later. The manual I'm looking at online says that's when multi-table UPDATE was implemented.

I'm not entirely sure, but you might have a problem with the multi-table UPDATE not knowing which table 'alias', 'real_name' or 'align' are supposed to be in. (ie, 1.alias, or m.alias) Everything else in the line (repeated below) is defined.

$sql = "UPDATE char_lair l, char_main m " .
           "SET l.zip_id='$zip', l.lair_addr='$address', " .
           "alias='$alias', real_name='$name', align='$align' " .
           "WHERE m.id = $cid AND m.lair_id = l.id";

I don't see anything else that looks wrong about it, and I haven't had a chance to try the programs yet... I've only had the book for a day.

                                             ..KARL...

<SPAN ATTRIB="DORK">KarlGG</SPAN>
Reply With Quote