UPDATING Multiple tables
Posted: Thu Mar 16, 2006 9:14 am
Hello,
I have the following SQL statement that updates 2 tables
my question is...if there was information in one table that was changed and in another it remained the same would it return affected rows?
another question ...if there werent any records in contact but there is in the accomodations (or vice versa) wud the accomodations table still be updated and return affected rows?
I have the following SQL statement that updates 2 tables
Code: Select all
UPDATE contacts, accommodations SET name = %s, address = %s, locale = %s, country = %s, region = %s, tel = %s, fax = %s, email = %s, www = %s, summary = %s, rooms = %s, price_range = %s, amenities = %s, services = %s, tttic = %s, accommodations.category = %s WHERE ACCID = index_no AND index_no = %s
*note the %s denotes placeholder for informationanother question ...if there werent any records in contact but there is in the accomodations (or vice versa) wud the accomodations table still be updated and return affected rows?