Re: Getting two queries into one result set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys,

Thanks for your replies but neither UNION or REGEXP can be used with SHOW 
TABLES...

Any ideas?

"Jochem Maas" <jochem@xxxxxxxxxxxxx> wrote in message 
news:41F77BC0.1040701@xxxxxxxxxxxxxxxx
> 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 query, 
>>> so how can I do two queries and combine the result set so I can loop 
>>> through it?
>>>
>>> Thanks for your help
>>
>>
>> SHOW TABLES REGEXP 'PID_[0-9]+';
>>
>
> nice! :-) 

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux