[ic] Searching Multiple DBs

Paul Jordan paul at gishnetwork.com
Thu Jan 15 12:50:56 EST 2004

Paul Jordan wrote:
> Did you mean "multiple databases" at once, or seperately? At any
> rate, I take it you have set up one mysql db, so set the other one
> up the same. IOW define another SQLDSN SQLPASS SQLUSER (but use say
> SQLDSN_2 SQLPASS_2 SQLUSER_2) etc in variale (or any other place you
> want to define this). Then define the table using THOSE vars, like in
> dbconf/mysql/foo.mysql. 
> to search it, just call the table.
> [query
>         ml=10
>         more=1
>         type=list
>         sp="@@MV_PAGE@@"
> --->    table=my_table_in_other_db      <----------------        
>         sql=|  
>		  SELECT  foo, bar
>             FROM    my_table_in_other_db  <----------------
>             WHERE   somecol BETWEEN '[cgi from]' AND '[cgi to]'
>             AND     someothercol = '[cgi whatever]'             ORDER
>         BY sku |]
>         [list] ....

Doh, the FROM was wrong in my example. corrected above.


More information about the interchange-users mailing list