数据库错误:Unknown column 'username' in 'field list'select id,tid,title,username,tel,addtime,orders,isshow,user,body,retime,reply from dy_message where isshow=1 and tid=43 order by orders desc,addtime desc,id desc
- /www/users/HA713593/WEB/include/mysql.php on line 88
83.
84.
public function errorMessage()
85.
{
86.
87.
$msg = $this->pdo->errorInfo();
88.
89.
if($msg[2]) syError('数据库错误:' . $msg[2] . end($this->arrSql));
//echo "未知错误!";exit;
90.
}
91.
}
- /www/users/HA713593/WEB/include/mysql.php on line 41
36.
$this->arrSql[] = $sql;
37.
$this->Statement = $this->pdo->query($sql);
38.
if ($this->Statement) {
39.
return $this;
40.
//return $this->Statement->execute();
41.
42.
}else $this->errorMessage();
}
43.
44.
public function exec($sql)
45.
{
46.
$this->arrSql[] = $sql;
- /www/users/HA713593/WEB/include/mysql.php on line 9
4.
public $pdo;
5.
public $arrSql;
6.
public $Statement;
7.
public function getArray($sql)
8.
{
9.
10.
if(!$result = $this->query($sql))return array();
if(!$this->Statement->rowCount())return array();
11.
$rows = array();
12.
while($rows[] = $this->Statement->fetch(PDO::FETCH_ASSOC)){}
13.
$this->Statement=null;
14.
array_pop($rows);
- /www/users/HA713593/WEB/include/syModel.php on line 124
119.
return $this->update($conditions, array($field=>$value));
120.
}
121.
122.
public function findSql($sql)
123.
{
124.
125.
return $this->_db->getArray($sql);
}
126.
127.
public function runSql($sql)
128.
{
129.
return $this->_db->exec($sql);
- /www/users/HA713593/WEB/include/syModel.php on line 295
290.
for($i=1; $i <= $total_page; $i++)$this->pageData['all_pages'][] = $i;
291.
$limit = ($page - 1) * $pageSize . "," . $pageSize;
292.
if('findSql'==$func_name)$conditions = $this->model_obj->_db->setlimit($conditions, $limit);
293.
}
294.
if('findSql'==$func_name){
295.
296.
return $this->model_obj->findSql($conditions);
}else{
297.
return $this->model_obj->findAll($conditions, $sort, $fields, $limit);
298.
}
299.
}
300.
}
- /www/users/HA713593/WEB/include/syModel.php on line 257
252.
return $this;
253.
}
254.
255.
public function __call($func_name, $func_args){
256.
if( ( 'findAll' == $func_name || 'findSql' == $func_name ) && 0 != $this->input_args[0]){
257.
258.
return $this->runpager($func_name, $func_args);
}elseif(method_exists($this,$func_name)){
259.
return call_user_func_array(array($this, $func_name), $func_args);
260.
}else{
261.
return call_user_func_array(array($this->model_obj, $func_name), $func_args);
262.
}
- /www/users/HA713593/WEB/source/message.php on line 48
43.
$sql='select id,tid,title,username,tel,addtime,orders,isshow,user,body,retime,reply'.$fields.' from '.$this->db.' a left join '.$this->db.'_field b on (a.id=b.aid)'.$w.$order;
44.
}else{
45.
$sql='select id,tid,title,username,tel,addtime,orders,isshow,user,body,retime,reply from '.$this->db.$w.$order;
46.
}
47.
$total_page=total_page($this->db.$w);
48.
49.
$this->lists = $this->Class->syPager($this->syArgs('page',0,1),$this->type['listnum'],$total_page)->findSql($sql);
$pages=$this->Class->syPager()->getPager();
50.
$this->pages=html_url('classtype',$this->type,$pages,$this->syArgs('page',0,1));
51.
52.
$this->positions='<a href="'.$GLOBALS["WWW"].'">首页</a>';
53.
$this->enpositions='<a href="'.$GLOBALS["WWW"].'">Home</a>';
- /www/users/HA713593/WEB/source/message.php on line 48
43.
$sql='select id,tid,title,username,tel,addtime,orders,isshow,user,body,retime,reply'.$fields.' from '.$this->db.' a left join '.$this->db.'_field b on (a.id=b.aid)'.$w.$order;
44.
}else{
45.
$sql='select id,tid,title,username,tel,addtime,orders,isshow,user,body,retime,reply from '.$this->db.$w.$order;
46.
}
47.
$total_page=total_page($this->db.$w);
48.
49.
$this->lists = $this->Class->syPager($this->syArgs('page',0,1),$this->type['listnum'],$total_page)->findSql($sql);
$pages=$this->Class->syPager()->getPager();
50.
$this->pages=html_url('classtype',$this->type,$pages,$this->syArgs('page',0,1));
51.
52.
$this->positions='<a href="'.$GLOBALS["WWW"].'">首页</a>';
53.
$this->enpositions='<a href="'.$GLOBALS["WWW"].'">Home</a>';
- /www/users/HA713593/WEB/include/Functions.php on line 16
11.
$handle_controller = syClass($__controller, null, $GLOBALS['G_DY']["controller_path"].'/'.$__controller.".php");
12.
if(!is_object($handle_controller) || !method_exists($handle_controller, $__action)){
13.
syError('route Error');
14.
exit;
15.
}
16.
17.
$handle_controller->$__action();
if(FALSE != $GLOBALS['G_DY']['view']['auto_display']){
18.
$__tplname = $__controller.$GLOBALS['G_DY']['view']['auto_display_sep'].
19.
$__action.$GLOBALS['G_DY']['view']['auto_display_suffix'];
20.
$handle_controller->auto_display($__tplname);
21.
}
- /www/users/HA713593/WEB/index.php on line 6
1.
<?php
2.
require("config.php");
3.
//下面是判断语句
4.
$doyoConfig['view']['config']['template_dir'] = APP_PATH.'/template/'.$doyoConfig['ext']['view_themes'];
5.
require(DOYO_PATH."/sys.php");
6.
spRun();