You can select from multiple databases and tables, ie:

SELECT database.table.field, otherdb.othertable.other FROM database.table,

  Even from two, three, four databases. But your queries might either get
too complicated or slow.

  So, store the results from simpler selects, using only two databases, on
temporaries tables of Type = HEAP. It's like they are 'memory tables', and
faster. So you can again select from another database and from this

  Well, use temporary table to reduce the number of Joins :-)

  This is kind of a query merger done in sql... other option is to merge the
individual sql queries using array_merge or similar functions.


Julio Nobrega.

"Daniel Ferreira Castro" <[EMAIL PROTECTED]> wrote in message
> Hello guys
> I have a database system that has many databases and many tables on each
> database.  I am trying to create a kind of search engine to seek data all
> over my database.
> I need to know if is possible to merge the results of my queries to later
> show them on a table or it is easier to perform the query and print the
> results on a HTML table leaving the table open, than perform another query
> and print it on.... until it is all over and close the table with
> Thank you
> Daniel F. Castro

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to