PDA

View Full Version : Question on conditionals


Macindy
01-24-2008, 07:03 AM
Hi there!

I setup a master/slave setup and want a conditional in my config.php.

I want the slave db working for the search and in the time 04:00-02:00.
In the time 02:00-04:00 the mysqldump is running, so I want in this time not the slave get any querys:

How can I make this?

I found something like this
if*(THIS_SCRIPT*==*search.php)
{
$config['SlaveServer']['servername']*=*';
$config['SlaveServer']['port']*=*3306;
$config['SlaveServer']['username']*=*'';
$config['SlaveServer']['password']*=*'';
$config['SlaveServer']['usepconnect']*=*0;
}*

How can I implement the time? Thanks!