Re: Getting two queries into one result set
| From: | Graham Cossey | Date: | Wed, 02 Feb 2005 14:50:52 +0000 |
| Subject: | Re: Getting two queries into one result set | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207890@lists.php.net to get a copy of this message | ||
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