Re: [PHP] Getting two queries into one result set

2005-02-02 Thread Shaun
Hi guys, Thanks for your replies but neither UNION or REGEXP can be used with SHOW TABLES... Any ideas? Jochem Maas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Marek Kilimajer wrote: Shaun wrote: Hi, I have a query where I select all table names where the table name has

RE: [PHP] Getting two queries into one result set

2005-02-02 Thread Jay Blanchard
[snip] Thanks for your replies but neither UNION or REGEXP can be used with SHOW TABLES... [/snip] SHOW TABLES is such a limited query and allows for such primitive conditionals that you would probably have better results doing two queries and looping them into the same output -- PHP General

Re: [PHP] Getting two queries into one result set

2005-02-02 Thread Marek Kilimajer
Shaun wrote: Hi guys, Thanks for your replies but neither UNION or REGEXP can be used with SHOW TABLES... Any ideas? It's time to change your table design. Use one pid table and add another column that would hold the number. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Getting two queries into one result set

2005-02-02 Thread Graham Cossey
You don't say how many tables you have, how they are named or anything outside of the query itself. Assuming that not all your tables are named PID_* how about simply doing SHOW TABLES LIKE '%PID_%' and selecting appropriate results within the php script using strstr or regular expressions?

Re: [PHP] Getting two queries into one result set

2005-02-02 Thread Tom
Graham Cossey wrote: You don't say how many tables you have, how they are named or anything outside of the query itself. Assuming that not all your tables are named PID_* how about simply doing SHOW TABLES LIKE '%PID_%' and selecting appropriate results within the php script using strstr or

[PHP] Getting two queries into one result set

2005-01-26 Thread Shaun
Hi, I have a query where I select all table names where the table name has PID_1 in i.e. SHOW TABLES LIKE '%PID_1%'; However there may be cases where I need to search for tables where the table name is PID_1 or PID_2. In MySQL this can't be done in one query, so how can I do two queries and

Re: [PHP] Getting two queries into one result set

2005-01-26 Thread Marek Kilimajer
Shaun wrote: Hi, I have a query where I select all table names where the table name has PID_1 in i.e. SHOW TABLES LIKE '%PID_1%'; However there may be cases where I need to search for tables where the table name is PID_1 or PID_2. In MySQL this can't be done in one query, so how can I do two

Re: [PHP] Getting two queries into one result set

2005-01-26 Thread Jochem Maas
Marek Kilimajer wrote: Shaun wrote: Hi, I have a query where I select all table names where the table name has PID_1 in i.e. SHOW TABLES LIKE '%PID_1%'; However there may be cases where I need to search for tables where the table name is PID_1 or PID_2. In MySQL this can't be done in one