1 Install 2 Databases

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Gugsy
Posts: 2
Joined: Thu Feb 03, 2011 5:56 am

1 Install 2 Databases

Post by Gugsy »

Is it possible to use 1 Serendipity install with 2 Databases and call from them based on conditions such as:

-time of day
-geo-location
-ip address
-useragent

If so a brief outline and some pointers for where to start would be appreciated?

Thanks.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: 1 Install 2 Databases

Post by garvinhicking »

Hi!

Yes, you could edit your serendipity_config_local.inc.php file. Inside there you can add your time of day / whatever checks, and depending on the output you set the $serendipty variables in that file accordingly to the one database or the other.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Gugsy
Posts: 2
Joined: Thu Feb 03, 2011 5:56 am

Re: 1 Install 2 Databases

Post by Gugsy »

Okay, Thanks. Am I also correct in thinking that I could use just the one database but use a separate database prefix to achieve the same end?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: 1 Install 2 Databases

Post by garvinhicking »

Hi!
Gugsy wrote:Okay, Thanks. Am I also correct in thinking that I could use just the one database but use a separate database prefix to achieve the same end?
Sure, that ends up the same!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply