Database SQL: "SELECT * FROM book_index WHERE `id` = :id LIMIT 1", ErrorInfo: Server shutdown in progress

363.              }
364.          }
365.          
366.          if($sth->execute())return $readonly $sth->fetchAll(PDO::FETCH_ASSOC) : $sth->rowCount();
367.          $err $sth->errorInfo();
368.          err('Database SQL: "' $sql'", ErrorInfo: '$err[2], 1);
369.      }
370.      
371.      public function dbInstance($db_config$db_config_key$force_replace false){
372.          if($force_replace || empty($GLOBALS['mysql_instances'][$db_config_key])){
373.              try {
335.              }
336.          }
337.          return $this->page;
338.      }
339.      
340.      public function query($sql$params = array()){return $this->execute($sql$paramstrue);}
341.      public function execute($sql$params = array(), $readonly false){
342.          $this->sql[] = $sql;
343. 
344.          if($readonly && !empty($GLOBALS['mysql']['MYSQL_SLAVE'])){
345.              $slave_key array_rand($GLOBALS['mysql']['MYSQL_SLAVE']);
255.              $limit $this->pager($limit[0], $limit[1], $limit[2], $total[0]['M_COUNTER']);
256.              $limit = empty($limit) ? '' ' LIMIT '.$limit['offset'].','.$limit['limit'];            
257.          }else{
258.              $limit = !empty($limit) ? ' LIMIT '.$limit '';
259.          }
260.          return $this->query('SELECT '$fields $sql $sort $limit$conditions["_bindParams"]);
261.      }
262.      
263.      public function find($conditions = array(), $sort null$fields '*'){
264.          $res $this->findAll($conditions$sort$fields1);
265.          return !empty($res) ? array_pop($res) : false;
259.          }
260.          return $this->query('SELECT '$fields $sql $sort $limit$conditions["_bindParams"]);
261.      }
262.      
263.      public function find($conditions = array(), $sort null$fields '*'){
264.          $res $this->findAll($conditions$sort$fields1);
265.          return !empty($res) ? array_pop($res) : false;
266.      }
267.      
268.      public function update($conditions$row){
269.          $values = array();
29.          $redisDataIndex $redisObj->get($cacheKeyIndex);
30.          $redisDataIndex="";
31.          $bookIndex = new BookIndex(); 
32.          if(empty($redisDataIndex)){
33.              
34.              $bookIndexDetail $bookIndex->find(["id"=>$indexId]);
35.              
36.              $contentService = new BookContent();
37.              $suffix $indexId 10
38.              $tablename "book_content{$suffix}";//print_r("select * from ".$tablename." where index_id=".$indexId);
39.              $bookContent $contentService->query("select * from ".$tablename." where index_id=".$indexId);
111.      // exit;
112.  };
113.  if(!method_exists($controller_name$action_name))_err_router("Err: Method '$action_name' of '$controller_name' is not exists!");
114. 
115.  $controller_obj = new $controller_name();
116.  $controller_obj->$action_name();
117. 
118.  if($controller_obj->_auto_display){
119.      $auto_tpl_name = (empty($__module) ? '' $__module.DS).$__controller.'_'.$__action.'.html';
120.      if(file_exists(APP_DIR.DS.'protected'.DS.'view'.DS.$auto_tpl_name))$controller_obj->display($auto_tpl_name);
121.  }
3.  header('Access-Control-Allow-Origin: *');
4.  header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
5.  header('Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With');
6.  define('APP_DIR'realpath('./'));
7.  define("APP_PATH",dirname(__FILE__));
8.  require(APP_DIR.'/protected/lib/speed.php');