Re: Select from 24 tables
| From: | John Nichel | Date: | Sat, 01 May 2004 20:13:32 +0000 |
| Subject: | Re: Select from 24 tables | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185109@lists.php.net to get a copy of this message | ||
John W. Holmes wrote:
Dave Carrera wrote:Yeah, better what John said than what I said. ;) -- By-Tor.com It's all about the Rush http://www.by-tor.comHi List, How do I select data from 24 table in my database. Each one is identical in structure layout being Id,name,listThe 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.