RE: [PHP-DB] I have a query

2004-09-29 Thread Mulley, Nikhil
To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] I have a query if the tables have the same structure, use the union operator to query each table separately and return it all in one result set select * from asset1 where asset_loc='heaven' union select * from asset2 where

Re: [PHP-DB] I have a query

2004-09-29 Thread Joseph Crawford
> I have database called asset > in which 5 table are present namely asset1,asset2,asset3,asset4,asset5... > > all the tables have the same schema structure and common field names ,equal no of > columns(but not the equal number of rows) why on earth would you do this? rather i would create a dat

RE: [PHP-DB] I have a query

2004-09-29 Thread Hutchins, Richard
Just an addendum to Bastien's post: You'll need MySql 4.0+ if you want to use UNION. > -Original Message- > From: Bastien Koert [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 29, 2004 2:15 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE

RE: [PHP-DB] I have a query

2004-09-29 Thread Bastien Koert
if the tables have the same structure, use the union operator to query each table separately and return it all in one result set select * from asset1 where asset_loc='heaven' union select * from asset2 where asset_loc='heaven' union select * from asset3 where asset_loc='heaven' union select * fro