Dave Carrera wrote:

Hi List,

How do I select data from 24 table in my database.

Each one is identical in structure layout being

Id,name,list

The first thing you need to do is reorganize your database schema and put all of this into one table. You can see what a pain it is having 24 similar tables already and it's only going to get worse.


You could probably use a UNION to join all of the tables together in your query, but I doubt it's going to very efficient. You can't select from a list of tables the way you're trying to, though.

Last option is putting your query in a loop and executing it 24 different times, but you _really_ need to just fix the database structure now.

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to