You are here: Re: [PHP] Getting two queries into one result set « PHP « IT news, forums, messages
Re: [PHP] Getting two queries into one result set

Posted by Shaun on 02/02/05 15:35

Hi guys,

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

Any ideas?

"Jochem Maas" <jochem@iamjochem.com> wrote in message
news:41F77BC0.1040701@iamjochem.com...
> 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! :-)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация