数据库错误:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY sid LIMIT 1' at line 1SELECT * FROM dy_special WHERE sid= ORDER BY sid LIMIT 1
- D:\wwwroot\ezhoujiapuzhi_97nv24\web\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.
- D:\wwwroot\ezhoujiapuzhi_97nv24\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;
- D:\wwwroot\ezhoujiapuzhi_97nv24\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);
- D:\wwwroot\ezhoujiapuzhi_97nv24\web\include\syModel.php on line 55
50.
}else{
51.
$sort = "ORDER BY {$this->pk}";
52.
}
53.
$sql = "SELECT {$fields} FROM {$this->tbl_name} {$where} {$sort}";
54.
if(null != $limit)$sql = $this->_db->setlimit($sql, $limit);
55.
56.
return $this->_db->getArray($sql);
}
57.
58.
public function escape($value)
59.
{
60.
return $this->_db->__val_escape($value);
- D:\wwwroot\ezhoujiapuzhi_97nv24\web\include\syModel.php on line 27
22.
if ($this->_db->showtables($value)==0){return TRUE;}else{return FALSE;}
23.
}
24.
25.
public function find($conditions = null, $sort = null, $fields = null)
26.
{
27.
28.
if( $record = $this->findAll($conditions, $sort, $fields, 1) ){
return array_pop($record);
29.
}else{
30.
return FALSE;
31.
}
32.
}
- D:\wwwroot\ezhoujiapuzhi_97nv24\web\Home\special.php on line 27
22.
if($this->syArgs('file',1)!=''){
23.
$this->special=syDB('special')->find(' htmlfile="'.$this->syArgs('file',1).'" or sid='.$this->syArgs('file').' ');
24.
$tid = $this->special['sid'];
25.
}else{
26.
$sid = $this->syArgs('sid');
27.
28.
$this->special=syDB('special')->find(" sid=".$sid." ");
}
29.
if(!$this->special){message("指定专题不存在");}
30.
31.
$this->db=$GLOBALS['G_DY']['db']['prefix'].$this->special['molds'];
32.
- D:\wwwroot\ezhoujiapuzhi_97nv24\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.
}
- D:\wwwroot\ezhoujiapuzhi_97nv24\web\index.php on line 18
13.
}
14.
15.
require("config.php");
16.
$doyoConfig['view']['config']['template_dir'] = APP_PATH.'/template/'.$doyoConfig['ext']['view_themes'];
17.
require(DOYO_PATH."/sys.php");
18.
spRun();