Re: select data from more db

2001-10-01 Thread Benjamin Pflugmann

Hi.

On Tue, Oct 02, 2001 at 08:18:50AM +0700, [EMAIL PROTECTED] wrote:
> Hi,
>   I have data on more than 1 database with same schema.  How could I use SQL 
> statement to retrieve it for display in 1 time?

There is no SQL command to do that (yet). In the upcoming version 4.0
there is support for UNION which may do what you want.

For now, you might want to have a look at MERGE table, but these will
only work if the tables are within one database. So this isn't an
option for you, I fear, if you really meant databases and not tables.

> Pls describe with PHP code.

Sorry, this is a MySQL list. I don't know PHP well enough to write
something up.

The idea is to write a loop which will query each database
sequentielly and compile the result to one big list.

Btw, why do you save same entities in different databases at all?


Bye,

Benjamin.

-- 
[EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




select data from more db

2001-10-01 Thread Sommai Fongnamthip

Hi,
I have data on more than 1 database with same schema.  How could I use SQL 
statement to retrieve it for display in 1 time?  Pls describe with PHP code.

thanks
SF


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php