数据库错误:Column 'id' in where clause is ambiguousselect * from yd_contact a left join yd_contact_field b on (a.id=b.aid) where id=2 and isshow=1 limit 1
- /usr/home/syu7560440001/htdocs/include/mysql.php on line 85
80.
81.
public function errorMessage()
82.
{
83.
84.
$msg = $this->pdo->errorInfo();
85.
86.
if($msg[2]) syError('数据库错误:' . $msg[2] . end($this->arrSql));
//echo "未知错误!";exit;
87.
}
88.
}
89.
- /usr/home/syu7560440001/htdocs/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;
- /usr/home/syu7560440001/htdocs/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);
- /usr/home/syu7560440001/htdocs/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);
- /usr/home/syu7560440001/htdocs/source/channel.php on line 20
15.
$this->channel=syDB($this->molds)->findSql('select * from '.$this->db.' a left join '.$this->db.'_field b on (a.id=b.aid) where (htmlfile="'.$this->syArgs('file',1).'" or id='.$this->syArgs('file').') and isshow=1 limit 1');
16.
$id = $this->channel['id'];
17.
}else{
18.
$id = $this->syArgs('id');
19.
if(!$id){message("请指定内容id");}
20.
21.
$this->channel=syDB($this->molds)->findSql('select * from '.$this->db.' a left join '.$this->db.'_field b on (a.id=b.aid) where id='.$id.' and isshow=1 limit 1');
}
22.
if(!$this->channel){message("指定内容不存在或未审核");}
23.
$this->channel=$this->channel[0];
24.
$this->channel=array_merge($this->channel,array('tid_leafid'=>$this->sy_class_type->leafid($this->channel['tid'])));
25.
if($this->channel['mrank']>0||$this->channel['mgold']>0){
- /usr/home/syu7560440001/htdocs/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.
}
- /usr/home/syu7560440001/htdocs/index.php on line 9
4.
5.
require("config.php");
6.
7.
$doyoConfig['view']['config']['template_dir'] = APP_PATH.'/template/'.$doyoConfig['ext']['view_themes'];
8.
require(DOYO_PATH."/sys.php");
9.
spRun();