select * from yt_article a left join yt_article_field b on (a.id=b.aid) where id= and isshow=1 limit 1
执行错误: 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 'and isshow=1 limit 1' at line 1
- /home/mdj10241gmjdhjn120u294c1/wwwroot/include/mysql.php on line 39
34.
$this->arrSql[] = $sql;
35.
if( $result = mysql_query($sql, $this->conn) ){
36.
return $result;
37.
}else{
38.
if(mysql_error()!=''){
39.
40.
syError("{$sql}<br />执行错误: " . mysql_error());
}else{
41.
return TRUE;
42.
}
43.
}
44.
}
- /home/mdj10241gmjdhjn120u294c1/wwwroot/include/mysql.php on line 8
3.
class db_mysql {
4.
public $conn;
5.
public $arrSql;
6.
public function getArray($sql)
7.
{
8.
9.
if( ! $result = $this->exec($sql) )return array();
if( ! mysql_num_rows($result) )return array();
10.
$rows = array();
11.
while($rows[] = mysql_fetch_array($result,MYSQL_ASSOC)){}
12.
mysql_free_result($result);
13.
array_pop($rows);
- /home/mdj10241gmjdhjn120u294c1/wwwroot/include/syModel.php on line 125
120.
return $this->update($conditions, array($field=>$value));
121.
}
122.
123.
public function findSql($sql)
124.
{
125.
126.
return $this->_db->getArray($sql);
}
127.
128.
public function runSql($sql)
129.
{
130.
return $this->_db->exec($sql);
- /home/mdj10241gmjdhjn120u294c1/wwwroot/ytmanage/article.php on line 50
45.
if($this->syArgs('file',1)!=''){
46.
$this->article=syDB('article')->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');
47.
$id = $this->article['id'];
48.
}else{
49.
$id = $this->syArgs('id');
50.
51.
$this->article=syDB('article')->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');
}
52.
53.
if(!$this->article){message("指定内容不存在或未审核");}
54.
$this->article=$this->article[0];
55.
// if($this->article['tid']==41){
- /home/mdj10241gmjdhjn120u294c1/wwwroot/include/Functions.php on line 21
16.
if(!is_object($handle_controller) || !method_exists($handle_controller, $__action)){
17.
syError('route Error');
18.
exit;
19.
20.
}
21.
22.
$handle_controller->$__action();
23.
if(FALSE != $GLOBALS['G_DY']['view']['auto_display']){
24.
$__tplname = $__controller.$GLOBALS['G_DY']['view']['auto_display_sep'].
25.
$__action.$GLOBALS['G_DY']['view']['auto_display_suffix'];
26.
$handle_controller->auto_display($__tplname);
- /home/mdj10241gmjdhjn120u294c1/wwwroot/index.php on line 19
14.
}
15.
}
16.
require("config.php");
17.
$yitongConfig['view']['config']['template_dir'] = APP_PATH.'/template/'.$yitongConfig['ext']['view_themes'];
18.
require(YITONG_PATH."/sys.php");
19.
spRun();