Database SQL: "UPDATE test_user SET `username` = :M_UPDATE_username WHERE `uid` = :uid", 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 243
238.
foreach ($row as $k=>$v){
239.
$values[":M_UPDATE_".$k] = $v;
240.
$setstr[] = "`{$k}` = ".":M_UPDATE_".$k;
241.
}
242.
$conditions = $this->_where( $conditions );
243.
244.
return $this->execute("UPDATE ".$this->table_name." SET ".implode(', ', $setstr).$conditions["_where"], $conditions["_bindParams"] + $values);
}
245.
246.
public function incr($conditions, $field, $optval = 1){
247.
$conditions = $this->_where( $conditions );
248.
return $this->execute("UPDATE ".$this->table_name." SET `{$field}` = `{$field}` + :M_INCR_VAL ".$conditions["_where"], $conditions["_bindParams"] + array(":M_INCR_VAL" => $optval));
- D:\workplace\aiPicCreate\protected\controller\DbController.php on line 27
22.
$user = new User();
23.
// 修改uid=2的名字为whoami
24.
$this->result = $user->update(array(
25.
"uid" => "2" // 条件
26.
), array(
27.
28.
"username" => "whoami" // 修改的内容,键是字段名
));
29.
// update返回结果是影响行数,返回0证明查询不到对应条件的数据
30.
31.
$this->findall = $user->findAll();
32.
$this->display("db/update.html");
- 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');