UPDATE user SET viewcount=viewcount+1 WHERE id=20
执行错误: Unknown column 'viewcount' in 'field list'
- D:\wwwroot\cqhunsha\SpeedPHP\Drivers\mysql.php on line 62
57.
{
58.
$this->arrSql[] = $sql;
59.
if( $result = mysql_query($sql, $this->conn) ){
60.
return $result;
61.
}else{
62.
63.
spError("{$sql}<br />执行错误: " . mysql_error());
}
64.
}
65.
66.
/**
67.
* 返回影响行数
- D:\wwwroot\cqhunsha\SpeedPHP\Core\spModel.php on line 217
212.
*
213.
* @param sql 字符串,需要执行的SQL语句
214.
*/
215.
public function runSql($sql)
216.
{
217.
218.
return $this->_db->exec($sql);
}
219.
// query是runSql的别名,向前兼容
220.
public function query($sql){return $this->runSql($sql);}
221.
222.
/**
- D:\wwwroot\cqhunsha\SpeedPHP\Core\spModel.php on line 220
215.
public function runSql($sql)
216.
{
217.
return $this->_db->exec($sql);
218.
}
219.
// query是runSql的别名,向前兼容
220.
221.
public function query($sql){return $this->runSql($sql);}
222.
/**
223.
* 返回最后执行的SQL语句供分析
224.
*/
225.
public function dumpSql()
- D:\wwwroot\cqhunsha\controller\mall.php on line 430
425.
$this->id = $id;
426.
$this->shop = $this->tUser->find(array('id'=>$id));
427.
428.
//热度+1
429.
$sql = "UPDATE user SET viewcount=viewcount+1 WHERE id=$id";
430.
431.
$this->tPub->query($sql);
432.
//计算产品数量
433.
$sql = "SELECT COUNT(*) AS pd_count FROM pd WHERE uid=$id";
434.
$pd_counter = $this->tPub->findSql($sql);
435.
$this->pd_counter = $pd_counter[0];
- D:\wwwroot\cqhunsha\SpeedPHP\spFunctions.php on line 21
16.
if(!is_object($handle_controller) || !method_exists($handle_controller, $__action)){
17.
eval($GLOBALS['G_SP']["dispatcher_error"]);
18.
exit;
19.
}
20.
// 路由并执行用户代码
21.
22.
$handle_controller->$__action();
// 控制器程序运行完毕,进行模板的自动输出
23.
if(FALSE != $GLOBALS['G_SP']['view']['auto_display']){
24.
$__tplname = $__controller.$GLOBALS['G_SP']['view']['auto_display_sep'].
25.
$__action.$GLOBALS['G_SP']['view']['auto_display_suffix']; // 拼装模板路径
26.
$handle_controller->auto_display($__tplname);
- D:\wwwroot\cqhunsha\index.php on line 61
56.
'mode'=>'debug',
57.
58.
);
59.
require(SP_PATH."/SpeedPHP.php");
60.
error_reporting(0);
61.
spRun();