SELECT COUNT(id) as sp_counter FROM () sp_tmp_table_pager1
执行错误: 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 ') sp_tmp_table_pager1' at line 1
- D:\wwwroot\galonchina\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.
}
- D:\wwwroot\galonchina\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);
- D:\wwwroot\galonchina\wwwroot\include\syModel.php on line 123
118.
return $this->update($conditions, array($field=>$value));
119.
}
120.
121.
public function findSql($sql)
122.
{
123.
124.
return $this->_db->getArray($sql);
}
125.
126.
public function runSql($sql)
127.
{
128.
return $this->_db->exec($sql);
- D:\wwwroot\galonchina\wwwroot\include\syModel.php on line 275
270.
$page = $this->input_args[0];
271.
if($page==0)$page=1;
272.
$pageSize = $this->input_args[1];
273.
@list($conditions, $sort, $fields ) = $func_args;
274.
if('findSql'==$func_name){
275.
276.
$a=$this->model_obj->findSql("SELECT COUNT({$this->model_obj->pk}) as sp_counter FROM ($conditions) sp_tmp_table_pager1");
$a=array_pop( $a );
277.
$total_count = array_pop( $a );
278.
}else{
279.
$total_count = $this->model_obj->findCount($conditions);
280.
}
- D:\wwwroot\galonchina\wwwroot\include\syModel.php on line 256
251.
return $this;
252.
}
253.
254.
public function __call($func_name, $func_args){
255.
if( ( 'findAll' == $func_name || 'findSql' == $func_name ) && 0 != $this->input_args[0]){
256.
257.
return $this->runpager($func_name, $func_args);
}elseif(method_exists($this,$func_name)){
258.
return call_user_func_array(array($this, $func_name), $func_args);
259.
}else{
260.
return call_user_func_array(array($this->model_obj, $func_name), $func_args);
261.
}
- D:\wwwroot\galonchina\wwwroot\doyo\product.php on line 225
220.
$sql="select * from ".$this->db."_field a left join ".$this->db." b on a.aid=b.id where tj_keywords like '%".$data."%' ";
221.
break;
222.
}
223.
224.
225.
226.
$this->lists = $this->Class->syPager($this->syArgs('page',0,1),1000)->findSql($sql);
227.
$pages=$this->Class->syPager()->getPager();
228.
$this->pages=pagetxt($pages);
229.
$list_c=$this->lists;
230.
foreach($list_c as $k=>$v){
- D:\wwwroot\galonchina\wwwroot\doyo\product.php on line 225
220.
$sql="select * from ".$this->db."_field a left join ".$this->db." b on a.aid=b.id where tj_keywords like '%".$data."%' ";
221.
break;
222.
}
223.
224.
225.
226.
$this->lists = $this->Class->syPager($this->syArgs('page',0,1),1000)->findSql($sql);
227.
$pages=$this->Class->syPager()->getPager();
228.
$this->pages=pagetxt($pages);
229.
$list_c=$this->lists;
230.
foreach($list_c as $k=>$v){
- D:\wwwroot\galonchina\wwwroot\include\Functions.php on line 12
7.
$handle_controller = syClass($__controller, null, $GLOBALS['G_DY']["controller_path"].'/'.$__controller.".php");
8.
if(!is_object($handle_controller) || !method_exists($handle_controller, $__action)){
9.
syError('route Error');
10.
exit;
11.
}
12.
13.
$handle_controller->$__action();
if(FALSE != $GLOBALS['G_DY']['view']['auto_display']){
14.
$__tplname = $__controller.$GLOBALS['G_DY']['view']['auto_display_sep'].
15.
$__action.$GLOBALS['G_DY']['view']['auto_display_suffix'];
16.
$handle_controller->auto_display($__tplname);
17.
}
- D:\wwwroot\galonchina\wwwroot\index.php on line 6
1.
<?php
2.
3.
require("config.php");
4.
$doyoConfig['view']['config']['template_dir'] = APP_PATH.'/template/'.$doyoConfig['ext']['view_themes'];
5.
require(DOYO_PATH."/sys.php");
6.
spRun();