[ic] Alternative database

Stefan Hornburg (Racke) racke at linuxia.de
Sat Sep 26 06:15:41 UTC 2009


Marco wrote:
> Peter ha scritto:
>> On 09/24/2009 09:34 AM, Marco wrote:
>>> In a specific page of the ic catalog i must do all sql queries to the 
>>> localhost or to an alternative ip mysql server depending from a cgi par 
>>> value.
>>>
>>> What the best way ?
>>> Is it possible to use ic [query] tag ?
>> You can add Database directives for your alternative tables and then you
>> simply need to reference those tables in your [query] tag.
>>
>> <http://www.interchange.rtfm.info/icdocs/config/Database.html>
>>
>> Peter
> 
> Seems simple and powerful, thanks Peter !
> 

Yes, you might need to use [query]'s table parameter so it knows which
database is referenced.

[query table="table_from_altdb" sql="select ..." list=1]
....
[/query]

Regards
         Racke

-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team




More information about the interchange-users mailing list