From c6f21b69e8210bdd0e80cf87f1c2f06dfc848a75 Mon Sep 17 00:00:00 2001 From: niekt0 Date: Fri, 22 Oct 2010 16:37:17 +0200 Subject: [PATCH] Switched off load balancing --- wwwroot/inc/database.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wwwroot/inc/database.inc b/wwwroot/inc/database.inc index 53f698d..815f03f 100644 --- a/wwwroot/inc/database.inc +++ b/wwwroot/inc/database.inc @@ -65,7 +65,7 @@ function query($sql) { // if (preg_match("/^select/i",$sql) && (rand(0,1000)>MASTER2SLAVE) && $this->Master) { // every select query goes to onyx + opraveny regexp, aby matchoval vnorene selecty (br) - if (preg_match('/^\(?select/i',$sql) && $this->Master) { +/* if (preg_match('/^\(?select/i',$sql) && $this->Master) { $this->_linkId = false; $this->connect(SLAVE_HOST,SLAVE_USER,SLAVE_PASS,SLAVE_DATABASE); $this->Master = false; @@ -73,10 +73,10 @@ function query($sql) { } elseif (!preg_match("/^select/i",$sql) && !$this->Master) { - $this->_linkId = false; +*/ $this->_linkId = false; $this->connect(DB_HOST,DB_USER,DB_PASS,DB_DATABASE); $this->Master = true; - } +// } $this->_queryId = mysql_query($sql,$this->_linkId); -- 2.30.2