Database SQL: "SELECT * FROM test_user WHERE `uid` = :uid LIMIT 1", ErrorInfo: Table 'sst.test_user' doesn't exist
- D:\workplace\aiPicCreate\protected\lib\speed.php on line 335
330.
}
331.
}
332.
333.
if($sth->execute())return $readonly ? $sth->fetchAll(PDO::FETCH_ASSOC) : $sth->rowCount();
334.
$err = $sth->errorInfo();
335.
336.
err('Database SQL: "' . $sql. '", ErrorInfo: '. $err[2], 1);
}
337.
338.
public function dbInstance($db_config, $db_config_key, $force_replace = false){
339.
if($force_replace || empty($GLOBALS['mysql_instances'][$db_config_key])){
340.
try {
- D:\workplace\aiPicCreate\protected\lib\speed.php on line 307
302.
}
303.
}
304.
return $this->page;
305.
}
306.
307.
308.
public function query($sql, $params = array()){return $this->execute($sql, $params, true);}
public function execute($sql, $params = array(), $readonly = false){
309.
$this->sql[] = $sql;
310.
311.
if($readonly && !empty($GLOBALS['mysql']['MYSQL_SLAVE'])){
312.
$slave_key = array_rand($GLOBALS['mysql']['MYSQL_SLAVE']);
- D:\workplace\aiPicCreate\protected\lib\speed.php on line 228
223.
$limit = $this->pager($limit[0], $limit[1], $limit[2], $total[0]['M_COUNTER']);
224.
$limit = empty($limit) ? '' : ' LIMIT '.$limit['offset'].','.$limit['limit'];
225.
}else{
226.
$limit = !empty($limit) ? ' LIMIT '.$limit : '';
227.
}
228.
229.
return $this->query('SELECT '. $fields . $sql . $sort . $limit, $conditions["_bindParams"]);
}
230.
231.
public function find($conditions = array(), $sort = null, $fields = '*'){
232.
$res = $this->findAll($conditions, $sort, $fields, 1);
233.
return !empty($res) ? array_pop($res) : false;
- D:\workplace\aiPicCreate\protected\lib\speed.php on line 232
227.
}
228.
return $this->query('SELECT '. $fields . $sql . $sort . $limit, $conditions["_bindParams"]);
229.
}
230.
231.
public function find($conditions = array(), $sort = null, $fields = '*'){
232.
233.
$res = $this->findAll($conditions, $sort, $fields, 1);
return !empty($res) ? array_pop($res) : false;
234.
}
235.
236.
public function update($conditions, $row){
237.
$values = array();
- D:\workplace\aiPicCreate\protected\controller\DbController.php on line 54
49.
50.
// 查找findAll/find
51.
function actionFind(){
52.
$user = new User();
53.
// 先查一条,uid为2的
54.
55.
$this->findone = $user->find(array("uid"=>"2"));
56.
// 查全部,用findAll
57.
// findAll( $conditions=array(), $order=null, $field='*', $limit=null )
58.
// findAll参数:$conditions数组形式的条件(同find),$field指定字段(默认是*),
59.
// $order是排序(如 “uid DESC”), $limit是限定条数(如“3,5”,第三条开始取五条)
- D:\workplace\aiPicCreate\protected\lib\speed.php on line 84
79.
if(!is_available_classname($__controller))_err_router("Err: Controller '$controller_name' is not correct!");
80.
if(!class_exists($controller_name, true))_err_router("Err: Controller '$controller_name' is not exists!");
81.
if(!method_exists($controller_name, $action_name))_err_router("Err: Method '$action_name' of '$controller_name' is not exists!");
82.
83.
$controller_obj = new $controller_name();
84.
85.
$controller_obj->$action_name();
86.
if($controller_obj->_auto_display){
87.
$auto_tpl_name = (empty($__module) ? '' : $__module.DS).$__controller.'_'.$__action.'.html';
88.
if(file_exists(APP_DIR.DS.'protected'.DS.'view'.DS.$auto_tpl_name))$controller_obj->display($auto_tpl_name);
89.
}
- D:\workplace\aiPicCreate\index.php on line 55
50.
header('Access-Control-Max-Age: 86400');
51.
}
52.
53.
define('APP_DIR', realpath('./'));
54.
define("APP_PATH",dirname(__FILE__));
55.
require(APP_DIR.'/protected/lib/speed.php');