SELECT COUNT(id) AS SP_COUNTER FROM vn_volunteer_activity WHERE volunteer_id =
执行错误: 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 '' at line 1
- /www/wwwroot/hlva.zgdshys.com/Comm/MyFrame/Drivers/mysql.php on line 62
57.
{
58.
$this->arrSql[] = $sql;
59.
if( $result = mysql_query($sql, $this->conn) ){
60.
return $result;
61.
}else{
62.
63.
spError("{$sql}<br />执行错误: " . mysql_error());
}
64.
}
65.
66.
/**
67.
* 返回影响行数
- /www/wwwroot/hlva.zgdshys.com/Comm/MyFrame/Drivers/mysql.php on line 26
21.
*
22.
* @param sql 执行的SQL语句
23.
*/
24.
public function getArray($sql)
25.
{
26.
27.
if( ! $result = $this->exec($sql) )return array();
if( ! mysql_num_rows($result) )return array();
28.
$rows = array();
29.
while($rows[] = mysql_fetch_array($result,MYSQL_ASSOC)){}
30.
mysql_free_result($result);
31.
array_pop($rows);
- /www/wwwroot/hlva.zgdshys.com/Comm/MyFrame/Core/spModel.php on line 257
252.
$where = "WHERE ".join(" AND ",$join);
253.
}else{
254.
if(null != $conditions)$where = "WHERE ".$conditions;
255.
}
256.
$sql = "SELECT COUNT({$this->pk}) AS SP_COUNTER FROM {$this->tbl_name} {$where}";
257.
258.
$result = $this->_db->getArray($sql);
return $result[0]['SP_COUNTER'];
259.
}
260.
261.
/**
262.
* 魔术函数,执行模型扩展类的自动加载及使用
- /www/wwwroot/hlva.zgdshys.com/Comm/MyFrame/Core/spModel.php on line 796
791.
}
792.
return $run_result;
793.
}elseif(in_array($func_name, $GLOBALS['G_SP']["auto_load_model"])){
794.
return spClass($func_name)->__input($this, $func_args);
795.
}else{
796.
797.
return call_user_func_array(array($this->model_obj, $func_name), $func_args);
}
798.
}
799.
800.
/**
801.
* 私有函数,辅助删除数据操作
- /www/wwwroot/hlva.zgdshys.com/Comm/MyFrame/Core/spModel.php on line 463
458.
$pageSize = $this->input_args[1];
459.
@list($conditions, $sort, $fields ) = $func_args;
460.
if('findSql'==$func_name){
461.
$total_count = array_pop( array_pop( $this->model_obj->findSql("SELECT COUNT({$this->model_obj->pk}) as sp_counter FROM ($conditions) sp_tmp_table_pager1") ) );
462.
}else{
463.
464.
$total_count = $this->model_obj->findCount($conditions);
}
465.
if($total_count > $pageSize){
466.
$total_page = ceil( $total_count / $pageSize );
467.
$page = min(intval(max($page, 1)), $total_count); // 对页码进行规范运算
468.
$this->pageData = array(
- /www/wwwroot/hlva.zgdshys.com/Comm/MyFrame/Core/spModel.php on line 463
458.
$pageSize = $this->input_args[1];
459.
@list($conditions, $sort, $fields ) = $func_args;
460.
if('findSql'==$func_name){
461.
$total_count = array_pop( array_pop( $this->model_obj->findSql("SELECT COUNT({$this->model_obj->pk}) as sp_counter FROM ($conditions) sp_tmp_table_pager1") ) );
462.
}else{
463.
464.
$total_count = $this->model_obj->findCount($conditions);
}
465.
if($total_count > $pageSize){
466.
$total_page = ceil( $total_count / $pageSize );
467.
$page = min(intval(max($page, 1)), $total_count); // 对页码进行规范运算
468.
$this->pageData = array(
- /www/wwwroot/hlva.zgdshys.com/Comm/MyFrame/Core/spModel.php on line 438
433.
/**
434.
* 魔术函数,支持多重函数式使用类的方法
435.
*/
436.
public function __call($func_name, $func_args){
437.
if( ( 'findAll' == $func_name || 'findSql' == $func_name ) && 0 != $this->input_args[0]){
438.
439.
return $this->runpager($func_name, $func_args);
}elseif(method_exists($this,$func_name)){
440.
return call_user_func_array(array($this, $func_name), $func_args);
441.
}else{
442.
return call_user_func_array(array($this->model_obj, $func_name), $func_args);
443.
}
- /www/wwwroot/hlva.zgdshys.com/Action/home.php on line 673
668.
}
669.
$this->uid = 2;
670.
//分类新闻列表|某一分类的列表|默认10条/页
671.
$this->page = intval($this->spArgs('page'))<=0 ? 1 : intval($this->spArgs('page'));
672.
$condition = "volunteer_id = ".$_SESSION['user']['id'];
673.
674.
$this->allactive= spClass('m_acvol')->spLinker()->spPager($this->page,10)->findAll($condition,'id desc');
$this->pager = spClass('m_acvol')->spPager()->getPager();
675.
if(intval($this->spArgs('page')) > intval($this->pager['total_page'])){
676.
header('HTTP/1.1 404 Not Found');
677.
import(APP_PATH.'/404.html');
678.
exit;
- /www/wwwroot/hlva.zgdshys.com/Action/home.php on line 673
668.
}
669.
$this->uid = 2;
670.
//分类新闻列表|某一分类的列表|默认10条/页
671.
$this->page = intval($this->spArgs('page'))<=0 ? 1 : intval($this->spArgs('page'));
672.
$condition = "volunteer_id = ".$_SESSION['user']['id'];
673.
674.
$this->allactive= spClass('m_acvol')->spLinker()->spPager($this->page,10)->findAll($condition,'id desc');
$this->pager = spClass('m_acvol')->spPager()->getPager();
675.
if(intval($this->spArgs('page')) > intval($this->pager['total_page'])){
676.
header('HTTP/1.1 404 Not Found');
677.
import(APP_PATH.'/404.html');
678.
exit;
- /www/wwwroot/hlva.zgdshys.com/Comm/MyFrame/spFunctions.php on line 32
27.
}else{
28.
spClass('m_conf')->update(array('id'=>1),array('yuefen'=>date('Y-m')));
29.
}
30.
}
31.
// 路由并执行用户代码
32.
33.
$handle_controller->$__action();
// 控制器程序运行完毕,进行模板的自动输出
34.
if(FALSE != $GLOBALS['G_SP']['view']['auto_display']){
35.
$__tplname = $__controller.$GLOBALS['G_SP']['view']['auto_display_sep'].
36.
$__action.$GLOBALS['G_SP']['view']['auto_display_suffix']; // 拼装模板路径
37.
$handle_controller->auto_display($__tplname);
- /www/wwwroot/hlva.zgdshys.com/index.php on line 13
8.
require('config.php');
9.
//加载框架核心
10.
require(SP_PATH.'/SpeedPHP.php');
11.
require('functions.php');
12.
//执行应用
13.
14.
spRun();
?>