CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 deleting from multiple tables

Print topic Send  topic

Author Message
capone

Posts: 6
Posted: 06/12/2008, 2:02 PM

i keep getting this error: Database error: Invalid SQL: delete from apply,rbase where apply.mid=rbase=.mid and mid='fc2de981ec293ad3cf439fd6b821b061' i can't seem to delete from multiple tables using mid key, only from single table any ideas?
View profile  Send private message
wkempees


Posts: 1679
Posted: 06/12/2008, 3:54 PM

What Database, what version?

More important what is the delete you are after:
Delete from (1) apply, delete from (2) both tables?

Case 1:rewrite it as
  
delete from apply   
where apply.mid= { select mid from rbase where mid='fc2de981ec293ad3cf439fd6b821b061')  
or as
  
delete apply.* from apply,rbase   
where apply.mid=rbase=.mid and mid='fc2de981ec293ad3cf439fd6b821b061'   

Case 2:
  
delete apply.*, rbase.* from apply,rbase   
where apply.mid=rbase=.mid and mid='fc2de981ec293ad3cf439fd6b821b061'   

(MySQL 4+, Probably Access as well)

Think you are after Case 2

Walter

_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.