Database SQL: "SELECT count(1) as count FROM `shops` WHERE fid 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
- D:\wwwroot\jubao\en\protected\lib\speed.php on line 339
334.
foreach($params as $k=>&$v) $sth->bindParam($k, $v);
335.
}
336.
337.
if($sth->execute())return $readonly ? $sth->fetchAll(PDO::FETCH_ASSOC) : $sth->rowCount();
338.
$err = $sth->errorInfo();
339.
340.
err('Database SQL: "' . $sql. '", ErrorInfo: '. $err[2], 1);
}
341.
342.
public function dbInstance($db_config, $db_config_key, $force_replace = false){
343.
if($force_replace || empty($GLOBALS['mysql_instances'][$db_config_key])){
344.
try {
- D:\wwwroot\jubao\en\protected\lib\speed.php on line 322
317.
}
318.
}
319.
return $this->page;
320.
}
321.
322.
323.
public function query($sql, $params = array()){return $this->execute($sql, $params, true);}
public function execute($sql, $params = array(), $readonly = false){
324.
$this->sql[] = $sql;
325.
326.
if($readonly && !empty($GLOBALS['mysql']['MYSQL_SLAVE'])){
327.
$slave_key = array_rand($GLOBALS['mysql']['MYSQL_SLAVE']);
- D:\wwwroot\jubao\en\protected\controller\app\productController.php on line 40
35.
$row=$sp->findAll(array('fid'=>$fid),'fg asc','id');
36.
$row=i_array_column($row,'id');
37.
$ids=join(',',$row);
38.
$sql="SELECT count(1) as count FROM `shops` WHERE fid in ({$ids})";
39.
40.
41.
$count=$sp->query($sql);
$count=$count['0']['count'];
42.
$page=arg('page',1);
43.
$pages=((int)$page-1)*10;
44.
if (!empty($ids)) {
45.
$sql="select * from `shops` where fid in ({$ids}) order by fg asc,time desc limit {$pages},12";
- D:\wwwroot\jubao\en\protected\lib\speed.php on line 90
85.
BaseController::err404($__module,$__controller, $__action);
86.
}
87.
}
88.
89.
$controller_obj = new $controller_name();
90.
91.
$controller_obj->$action_name();
92.
if($controller_obj->_auto_display){
93.
$auto_tpl_name = (empty($__module) ? '' : $__module.DS).$__controller.'_'.$__action.'.html';
94.
if(file_exists(APP_DIR.DS.'protected'.DS.'view'.DS.$auto_tpl_name))$controller_obj->display($auto_tpl_name);
95.
}
- D:\wwwroot\jubao\en\index.php on line 4
1.
<?php
2.
session_start();
3.
define('APP_DIR', realpath('./'));
4.
require(APP_DIR.'/protected/lib/speed.php');