[PHP] Select from 24 tables

2004-05-01 Thread Dave Carrera
Hi List, How do I select data from 24 table in my database. Each one is identical in structure layout being Id,name,list I want to select where like $_POST[var] from a form all of the tables but I am having trouble :( I thought making a var string like $string = table1,table2,table3,.;

Re: [PHP] Select from 24 tables

2004-05-01 Thread John Nichel
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 I want to select where like $_POST[var] from a form all of the tables but I am having trouble :( I thought making a var string like $string =

Re: [PHP] Select from 24 tables

2004-05-01 Thread John W. Holmes
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

Re: [PHP] Select from 24 tables

2004-05-01 Thread John Nichel
John W. Holmes wrote: 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

Re: [PHP] Select from 24 tables

2004-05-01 Thread Travis Low
This isn't always desirable, or even possible. I once designed a database to hold characteristics for a series of 70 different tests. There were about 50 different characteristics used in various combinations for each test. Each characteristic could be one of many values. So the

Re: [PHP] Select from 24 tables

2004-05-01 Thread Michal Migurski
This isn't always desirable, or even possible. I once designed a database to hold characteristics for a series of 70 different tests. There were about 50 different characteristics used in various combinations for each test. Each characteristic could be one of many values. So the

Re: [PHP] Select from 24 tables

2004-05-01 Thread Travis Low
Michal Migurski wrote: In my experience, it's usually a safe assumption that if you have a bunch of tables all structured identically and used in similar ways, you should probably merge them all into a single table with an extra column that corresponds to whatever differentiating characteristic

Re: [PHP] Select from 24 tables

2004-05-01 Thread Michal Migurski
Up what creek? You didn't really provide any technical justification for your suggestion. Up the creek of having to call for help on php-general because you have 24 identical tables you need to join, having never performed a join before. The pain only occurs when writing the SQL statements

Re: [PHP] Select from 24 tables

2004-05-01 Thread Travis Low
Hi Michal, Getting back to the original posting, I'm basically saying that I don't think it's a good idea to structure or restructure a database for the sake of simplifying a few SQL statements. Especially if the data being joined is in separate tables for a good reason. Regarding optimizing

Re: [PHP] Select from 24 tables

2004-05-01 Thread Curt Zirzow
* Thus wrote Travis Low ([EMAIL PROTECTED]): Hi Michal, Getting back to the original posting, I'm basically saying that I don't think it's a good idea to structure or restructure a database for the sake of simplifying a few SQL statements. Especially if the data being joined is in