Ok I upgraded to 4.1.12 Max so I could start using InnoDb and be able to do
multiple table deletes among others.
I have an app system that I need to delete info from a few tables when we
delete a bogus app or a client we cant place.
Here is the query I wrote that finally worked
DELETE applications,cl ient_rates,avai l_apps,req_docs ,uplo
ads FROM applications,cl ient_rates,avai l_apps,req_docs ,uplo
ads where applications.ci d='".$var."' or client_rates.ci d='".$var."' or
avail_apps.cid= '".$var."' or req_docs.cid='" .$var."' or
uploads.cid='". $var."'
It worked YAY!!! BUT it deleted everything in the tables ARGH!!! good thing
I was on a test DB.
Where did I go wrong? I have tried many variations and this was the only way
it didnt error but it didnt limit to cid = 384. I keep reading the section
on multiple table deletes but it isnt making sense.
SIDENOTE: When I tested the query I hardcoded $var as 384 (id of test
record) and pasted into SQL window on phpmyadmin
thx for any help
Eric
multiple table deletes among others.
I have an app system that I need to delete info from a few tables when we
delete a bogus app or a client we cant place.
Here is the query I wrote that finally worked
DELETE applications,cl ient_rates,avai l_apps,req_docs ,uplo
ads FROM applications,cl ient_rates,avai l_apps,req_docs ,uplo
ads where applications.ci d='".$var."' or client_rates.ci d='".$var."' or
avail_apps.cid= '".$var."' or req_docs.cid='" .$var."' or
uploads.cid='". $var."'
It worked YAY!!! BUT it deleted everything in the tables ARGH!!! good thing
I was on a test DB.
Where did I go wrong? I have tried many variations and this was the only way
it didnt error but it didnt limit to cid = 384. I keep reading the section
on multiple table deletes but it isnt making sense.
SIDENOTE: When I tested the query I hardcoded $var as 384 (id of test
record) and pasted into SQL window on phpmyadmin
thx for any help
Eric
Comment