Database SQL: "SELECT * FROM news_article WHERE cid = and id != 42 and is_verify = 1 ORDER BY sort desc LIMIT 0,10", ErrorInfo: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and id != 42 and is_verify = 1 ORDER BY sort desc LIMIT 0,10' at line 1

318.          if(is_array($params) && !empty($params)){
319.              foreach($params as $k=>&$v$sth->bindParam($k$v);
320.          }
321.          if($sth->execute())return $readonly $sth->fetchAll(PDO::FETCH_ASSOC) : $sth->rowCount();
322.          $err $sth->errorInfo();
323.          err('Database SQL: "' $sql'", ErrorInfo: '$err[2], 1);
324.      }
325.      public function dbInstance($db_config$db_config_key$force_replace false){
326.          if($force_replace || empty($GLOBALS['mysql_instances'][$db_config_key])){
327.              try {
328.                  $GLOBALS['mysql_instances'][$db_config_key] = new PDO('mysql:dbname='.$db_config['MYSQL_DB'].';host='.$db_config['MYSQL_HOST'].';port='.$db_config['MYSQL_PORT'], $db_config['MYSQL_USER'], $db_config['MYSQL_PASS'], array(PDO::MYSQL_ATTR_INIT_COMMAND=>'SET NAMES \''.$db_config['MYSQL_CHARSET'].'\''));
304.                  $this->page['all_pages'] = range($total_page-$scope+1$total_page);
305.              }
306.          }
307.          return $this->page;
308.      }
309.      public function query($sql$params = array()){return $this->execute($sql$paramstrue);}
310.      public function execute($sql$params = array(), $readonly false){
311.          $this->sql[] = $sql;
312.          if($readonly && !empty($GLOBALS['mysql']['MYSQL_SLAVE'])){
313.              $slave_key array_rand($GLOBALS['mysql']['MYSQL_SLAVE']);
314.              $sth $this->dbInstance($GLOBALS['mysql']['MYSQL_SLAVE'][$slave_key], 'slave_'.$slave_key)->prepare($sql);
225.              $limit $this->pager($limit[0], $limit[1], $limit[2], $total[0]['M_COUNTER']);
226.              $limit = empty($limit) ? '' ' LIMIT '.$limit['offset'].','.$limit['limit'];            
227.          }else{
228.              $limit = !empty($limit) ? ' LIMIT '.$limit '';
229.          }
230.          return $this->query('SELECT '$fields $sql $sort $limit$conditions["_bindParams"]);
231.      }
232.      public function find($conditions = array(), $sort null$fields '*'){
233.          $res $this->findAll($conditions$sort$fields1);
234.          return !empty($res) ? array_pop($res) : false;
235.      }
80.   * @param $param条件
81.   * @param $model模型
82.   */
83.  function get_model_other($param,$model,$title="*",$sort=null,$limit null){
84.      $obj=M($model);
85.       $rows=$obj->findAll($param,$sort,$title,$limit);
86.       $pager=$obj->page;
87.      if($rows){
88.          if($pager!=null){
89.              $rows['pager']=$pager;
90.          }
176.          }
177. 
178. 
179.          $this->catetitle $info['title'].'-';
180. 
181.          $res get_model_other(["cid = {$info['cid']} and id != {$id} and is_verify = 1 "] ,'news_article','*','sort desc','0,10');
182.          $this->res $res;
183. 
184.          //上一个 下一个
185.          $this->prev_one '';$this->next_one '';
186.          $all_data get_model_other([" cid = {$info['cid']}  and is_verify = 1 "],'news_article','*','sort desc');
99.      }else{
100.          BaseController::err404($__controller$__action);
101.      }
102.  }
103.  $controller_obj = new $controller_name();
104.  $controller_obj->$action_name();
105.  if($controller_obj->_auto_display){     
106.      $auto_tpl_name = (empty($__module) ?  '' ADDONS.DS.$__module.DS.'view').DS.$__controller.'_'.$__action.'.html';
107.      if(file_exists(APP_DIR.DS.  $auto_tpl_name))$controller_obj->display($auto_tpl_name);
108.  }
109.  function url($c 'main'$a 'index'$param = array()){    
20.  define 'SITE_DOMAIN'strip_tags $_SERVER ['HTTP_HOST'] ) );
21.  define 'SITE_PATH'dirname __FILE__ ) );// 网站根路径设置
22. 
23.  define('SYSNAME'"管理系统");
24.  //定义css常量
25.  require(APP_DIR.'/wlb/lib/speed.php');
26. 
27. 
28. 
29.