array vs db table (speed/efficiency)
Posted: Sun May 28, 2006 10:52 pm
I am going to query several db tables, but I was wandering which is the best way to get the tables names that I will be querying.
(1)Put them in an array inside a file, $tables = array("a", "b", "c"); then do my foreach loop and query table_a, table_b, table_c (of course using the array variables names)
(2)Make a db table with the tables names of a,b,c, then query that table and do my a,b,c tables queries while using a while to fetch_array from the tables listings
(1)Put them in an array inside a file, $tables = array("a", "b", "c"); then do my foreach loop and query table_a, table_b, table_c (of course using the array variables names)
(2)Make a db table with the tables names of a,b,c, then query that table and do my a,b,c tables queries while using a while to fetch_array from the tables listings