Database SQL: "update qt_sources set views=views+1 where id in()", 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 ')' at line 1
- /www/wwwroot/test.com/protected/lib/speed.php on line 348
343.
}
344.
}
345.
346.
if($sth->execute())return $readonly ? $sth->fetchAll(PDO::FETCH_ASSOC) : $sth->rowCount();
347.
$err = $sth->errorInfo();
348.
349.
err('Database SQL: "' . $sql. '", ErrorInfo: '. $err[2], 1);
}
350.
351.
public function dbInstance($db_config, $db_config_key, $force_replace = false){
352.
if($force_replace || empty($GLOBALS['mysql_instances'][$db_config_key])){
353.
try {
- /www/wwwroot/test.com/protected/lib/speed.php on line 320
315.
}
316.
}
317.
return $this->page;
318.
}
319.
320.
321.
public function query($sql, $params = array()){return $this->execute($sql, $params, true);}
public function execute($sql, $params = array(), $readonly = false){
322.
$this->sql[] = $sql;
323.
324.
if($readonly && !empty($GLOBALS['mysql']['MYSQL_SLAVE'])){
325.
$slave_key = array_rand($GLOBALS['mysql']['MYSQL_SLAVE']);
- /www/wwwroot/test.com/protected/controller/pc/MainController.php on line 329
324.
}else{
325.
$idsStr .= ",".$id;
326.
}
327.
}
328.
$idsStr = trim($idsStr,",");
329.
330.
$QtSources->query("update qt_sources set views=views+1 where id in(".$idsStr.")");
}
331.
// 获取热门列表
332.
function getHotList(){
333.
$QtSources = new QtSources();
334.
$records = $QtSources->findAll(array("content_status"=>1),"RAND()","id,title,views,dialogue_count,user_nums,shares,likes","0,30");
- /www/wwwroot/test.com/protected/controller/pc/MainController.php on line 765
760.
$record["thumbnail"] = "";
761.
}
762.
array_push($ids,$record["id"]);
763.
array_push($new_records, $record);
764.
}
765.
766.
$this->updateViews($ids);
if($pager == false){
767.
$pager = array("total_count"=>0,"page_size"=>35,"total_page"=>1);
768.
}
769.
$this->records=array("records"=>$new_records,"pager"=>$pager);
770.
}
- /www/wwwroot/test.com/protected/lib/speed.php on line 96
91.
exit;
92.
};
93.
if(!method_exists($controller_name, $action_name))_err_router("Err: Method '$action_name' of '$controller_name' is not exists!");
94.
95.
$controller_obj = new $controller_name();
96.
97.
$controller_obj->$action_name();
98.
if($controller_obj->_auto_display){
99.
$auto_tpl_name = (empty($__module) ? '' : $__module.DS).$__controller.'_'.$__action.'.html';
100.
if(file_exists(APP_DIR.DS.'protected'.DS.'view'.DS.$auto_tpl_name))$controller_obj->display($auto_tpl_name);
101.
}
- /www/wwwroot/test.com/index.php on line 8
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');