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 Graham Cossey on 02/02/05 16:50

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? SHOW TABLES is (normally) such a quick query
returning a larger result set shouldn't be too much of a problem,
should it?

HTH

Graham

On Wed, 02 Feb 2005 15:15:38 +0100, Marek Kilimajer <lists@kilimajer.net> wrote:
> 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, visit: http://www.php.net/unsub.php
>
>


--
Graham

 

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

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