Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Interchange: users

Alternative database

 

 

Interchange users RSS feed   Index | Next | Previous | View Threaded


m.mescoli at omnib

Sep 24, 2009, 9:34 AM

Post #1 of 4 (836 views)
Permalink
Alternative database

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 ?

--
Marco
"Fino alla bara sinpara"
"Up to demise we rise"

_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


peter at pajamian

Sep 24, 2009, 6:02 PM

Post #2 of 4 (769 views)
Permalink
Re: Alternative database [In reply to]

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

_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


m.mescoli at omnib

Sep 25, 2009, 8:19 AM

Post #3 of 4 (764 views)
Permalink
Re: Alternative database [In reply to]

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 !

--
Marco "Fino alla bara sinpara"
Marco "Up to demise we rise"

_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


racke at linuxia

Sep 25, 2009, 11:15 PM

Post #4 of 4 (761 views)
Permalink
Re: Alternative database [In reply to]

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


_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users

Interchange users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.