select * from utf8_web_sort where parent= order by list desc
執行錯誤: 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 list desc' at line 1
- C:\www\bfjs\SpeedPHP\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.
* 返回影響行數
- C:\www\bfjs\SpeedPHP\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 FALSE;
if( ! mysql_num_rows($result) )return FALSE;
28.
$rows = array();
29.
while($rows[] = mysql_fetch_array($result,MYSQL_ASSOC)){}
30.
mysql_free_result($result);
31.
array_pop($rows);
- C:\www\bfjs\SpeedPHP\Core\spModel.php on line 246
241.
public function findSql($sql,$args='')
242.
{
243.
if($args){
244.
log_class::addLog($args);
245.
}
246.
247.
return $this->_db->getArray($sql);
}
248.
/**
249.
* 執行SQL語句,相等于執行新增,修改,刪除等操作。
250.
251.
*
- C:\www\bfjs\model\utf8_web_sort.php on line 115
110.
return $rows;
111.
}
112.
113.
// 右側顯示欄目
114.
function get_right_sort($pid){
115.
116.
$rows = $this->findSql("select * from ".$this->table." where parent=".$pid." order by list desc");
return $rows;
117.
}
118.
}
119.
?>
- C:\www\bfjs\controller\common.php on line 267
262.
}
263.
264.
265.
//右側欄
266.
function banner($pid){
267.
268.
$rows = spClass("utf8_web_sort")->get_right_sort($pid);
// 獲取pid的name
269.
$sort_one = spClass("utf8_web_sort")->getSortById($pid);
270.
if(empty($rows)){
271.
$this->sorts = $sort_one;
272.
}
- C:\www\bfjs\controller\show.php on line 7
2.
import (APP_PATH.'/controller/general.php');
3.
class show extends general
4.
{
5.
function index(){
6.
$pid = $this->spArgs('pid');
7.
8.
$this->banner($pid);
$fid = $this->spArgs('fid');
9.
if(!$fid){
10.
$fid = $pid;
11.
$sec_nav['parent_id'] = $pid;
12.
}
- C:\www\bfjs\SpeedPHP\spFunctions.php on line 24
19.
eval($GLOBALS['G_SP']["dispatcher_error"]);
20.
exit;
21.
}
22.
// 路由并執行用戶代碼
23.
24.
25.
$handle_controller->$__action();
// 控制器程序運行完畢,進行模板的自動輸出
26.
27.
if(FALSE != $GLOBALS['G_SP']['view']['auto_display']){
28.
$__tplname = $__controller.$GLOBALS['G_SP']['view']['auto_display_sep'].
29.
$__action.$GLOBALS['G_SP']['view']['auto_display_suffix']; // 拼裝模板路徑
- C:\www\bfjs\index.php on line 11
6.
define("C_PATH",dirname(__FILE__).'/controller');
7.
$spConfig = array(
8.
9.
);
10.
require(SP_PATH."/SpeedPHP.php");
11.
spRun();