Page 1 of 1
Help me on complex queries ???
Posted: Sun Dec 31, 2006 6:07 am
by PHPycho
Can anybody guide in
* Selecting certain fields from two or more tables with certain things common
* deleting from two or more tables having common id
thanks in advance..................
Posted: Sun Dec 31, 2006 6:50 am
by neel_basu
If I Understand Your Question I Think
mysqli_multi_query() Is your Answer
Posted: Sun Dec 31, 2006 8:34 am
by feyd
I think PHPycho is referring to JOINs neel_basu.
Typically selecting elements from two or more tables requires a JOIN. Otherwise it's one query per table.
Foreign key constructs can perform deletes across tables, as can simply deleting from each table separately. Some databases support multiple table deletes, but you'll need to look at their manual for that information.
Posted: Sun Dec 31, 2006 9:23 am
by neel_basu
feyd wrote:I think PHPycho is referring to JOINs neel_basu.
Ya Thats Also Possible It Would Be Good If PHPycho Explain his Problem
Posted: Sun Dec 31, 2006 11:04 am
by PHPycho
Thanks for the replies..................
Actually i wanna select or delete from two or more tables having a common id in a single query...............
Please help me on those queries by specifying illustrations...
Posted: Sun Dec 31, 2006 11:20 am
by feyd
Those are JOINs. Please search; we have many many many examples all over the place.