Re: including the result of one query in another query

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

 



Jochem Maas wrote:
>> I have two databases, on for aeromodelistas (aeromodelling) and
>> another for Códigos Postais (Postal Codes). I whant to do the
> 
> what DB are you using? MySQL?
> you can't select across multiple DBs in any RDMS that I know of ...
> so it looks like either use 2 queries or merge the DBs?

I think he means tables. And yes you can, at least in MySQL, and
probably in others.

If you're using a version of MySQL prior to 4.1, though, you can't do
subqueries, which means that you'll need to reformulate your query with
joins.

Also DISTINCT isn't a function. The expression should be:

SELECT DISTINCT query_expr ...

not

SELECT distinct(query_expr) ...

Jasper

-- 
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