SELECT COUNT(id) AS SP_COUNTER FROM qf_self WHERE Array and visible = 1
執(zhí)行錯誤: Unknown column 'Array' in 'where clause'
- /home/hljt/domains/hl-jt.com/public_html/Comm/MyFrame/Drivers/mysql.php on line 82
77.
{
78.
$this->arrSql[] = $sql;
79.
if( $result = mysql_query($sql, $this->conn) ){
80.
return $result;
81.
}else{
82.
83.
spError("{$sql}<br />執(zhí)行錯誤: " . mysql_error());
}
84.
}
85.
86.
/**
87.
* 返回影響行數(shù)
- /home/hljt/domains/hl-jt.com/public_html/Comm/MyFrame/Drivers/mysql.php on line 26
21.
*
22.
* @param sql 執(zhí)行的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);
- /home/hljt/domains/hl-jt.com/public_html/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.
* 魔術(shù)函數(shù),執(zhí)行模型擴展類的自動加載及使用
- /home/hljt/domains/hl-jt.com/public_html/Comm/MyFrame/Core/spModel.php on line 438
433.
$pageSize = $this->input_args[1];
434.
@list($conditions, $sort, $fields ) = $func_args;
435.
if('findSql'==$func_name){
436.
$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") ) );
437.
}else{
438.
439.
$total_count = $this->model_obj->findCount($conditions);
}
440.
if($total_count > $pageSize){
441.
$total_page = ceil( $total_count / $pageSize );
442.
$page = min(intval(max($page, 1)), $total_count); // 對頁碼進行規(guī)范運算
443.
$this->pageData = array(
- /home/hljt/domains/hl-jt.com/public_html/Comm/MyFrame/Core/spModel.php on line 413
408.
/**
409.
* 魔術(shù)函數(shù),支持多重函數(shù)式使用類的方法
410.
*/
411.
public function __call($func_name, $func_args){
412.
if( ( 'findAll' == $func_name || 'findSql' == $func_name ) && 0 != $this->input_args[0]){
413.
414.
return $this->runpager($func_name, $func_args);
}elseif(method_exists($this,$func_name)){
415.
return call_user_func_array(array($this, $func_name), $func_args);
416.
}else{
417.
return call_user_func_array(array($this->model_obj, $func_name), $func_args);
418.
}
- /home/hljt/domains/hl-jt.com/public_html/Action/home.php on line 975
970.
//頁碼數(shù)
971.
$pages = $this->spArgs('page', 1);
972.
//每頁顯示記錄數(shù)
973.
$pagenum = 6;
974.
//列表
975.
976.
$this->list = $obj_self->spPager($pages, $pagenum)->findAll($condition_self,'orders DESC,id DESC');
//分頁數(shù)據(jù)
977.
$pager = $obj_self->spPager()->getPager();
978.
//導(dǎo)入自定義分頁類
979.
import('rewritepage.class.php');
980.
//實例化分頁
- /home/hljt/domains/hl-jt.com/public_html/Action/home.php on line 975
970.
//頁碼數(shù)
971.
$pages = $this->spArgs('page', 1);
972.
//每頁顯示記錄數(shù)
973.
$pagenum = 6;
974.
//列表
975.
976.
$this->list = $obj_self->spPager($pages, $pagenum)->findAll($condition_self,'orders DESC,id DESC');
//分頁數(shù)據(jù)
977.
$pager = $obj_self->spPager()->getPager();
978.
//導(dǎo)入自定義分頁類
979.
import('rewritepage.class.php');
980.
//實例化分頁
- /home/hljt/domains/hl-jt.com/public_html/Comm/MyFrame/spFunctions.php on line 21
16.
if(!is_object($handle_controller) || !method_exists($handle_controller, $__action)){
17.
eval($GLOBALS['G_SP']["dispatcher_error"]);
18.
exit;
19.
}
20.
// 路由并執(zhí)行用戶代碼
21.
22.
$handle_controller->$__action();
// 控制器程序運行完畢,進行模板的自動輸出
23.
if(FALSE != $GLOBALS['G_SP']['view']['auto_display']){
24.
$__tplname = $__controller.$GLOBALS['G_SP']['view']['auto_display_sep'].
25.
$__action.$GLOBALS['G_SP']['view']['auto_display_suffix']; // 拼裝模板路徑
26.
$handle_controller->auto_display($__tplname);
- /home/hljt/domains/hl-jt.com/public_html/index.php on line 18
13.
//加載配置文件
14.
require(APP_PATH.'/data/config.php');
15.
//加載框架核心
16.
require(SP_PATH.'/SpeedPHP.php');
17.
//執(zhí)行應(yīng)用
18.
spRun();