Exception: FLEA_Db_Exception_SqlQuery
Message: SQL 错误消息: "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 click_business desc limit 10' at line 1"
SQL 语句: " select * from xinwen_sort join business on id_sort = item_business where state=0 and parent= order by click_business desc limit 10"
SQL 错误代码: "7335941".
Filename: E:\wwwroot\st_xh\FLEA\FLEA\Db\Driver\Abstract.php [544]
#7 FLEA_Db_Driver_Mysql::execute(' select * from xinwen_sort ...')
ARGS:
Array
(
[0] => select * from xinwen_sort join business on id_sort = item_business where state=0 and parent= order by click_business desc limit 10
)
SOURCE CODE:
| 534 |
|
| 535 |
/**
|
| 536 |
* 执行一个查询,返回查询结果记录集
|
| 537 |
*
|
| 538 |
* @param string|resource $sql
|
| 539 |
*
|
| 540 |
* @return array
|
| 541 |
*/
|
| 542 |
function & getAll($sql)
|
| 543 |
{
|
| 544 |
$res = is_resource($sql) ? $sql : $this->execute($sql);
|
| 545 |
$rowset = array();
|
| 546 |
while ($row = $this->fetchAssoc($res)) {
|
| 547 |
$rowset[] = $row;
|
| 548 |
}
|
| 549 |
$this->freeRes($res);
|
| 550 |
return $rowset;
|
| 551 |
}
|
| 552 |
|
| 553 |
/**
|
| 554 |
* 执行查询,返回第一条记录的第一个字段
|
Filename: E:\wwwroot\st_xh\FLEA\FLEA\Db\TableDataGateway.php [702]
#6 FLEA_Db_Driver_Abstract::getAll(' select * from xinwen_sort ...')
ARGS:
Array
(
[0] => select * from xinwen_sort join business on id_sort = item_business where state=0 and parent= order by click_business desc limit 10
)
SOURCE CODE:
| 692 |
function & findBySql($sql, $limit = null)
|
| 693 |
{
|
| 694 |
// 处理 $limit
|
| 695 |
if (is_array($limit)) {
|
| 696 |
list($length, $offset) = $limit;
|
| 697 |
} else {
|
| 698 |
$length = $limit;
|
| 699 |
$offset = null;
|
| 700 |
}
|
| 701 |
if (is_null($length) && is_null($offset)) {
|
| 702 |
return $this->dbo->getAll($sql);
|
| 703 |
}
|
| 704 |
|
| 705 |
$result = $this->dbo->selectLimit($sql, $length, $offset);
|
| 706 |
if ($result) {
|
| 707 |
$rowset = $this->dbo->getAll($result);
|
| 708 |
} else {
|
| 709 |
$rowset = false;
|
| 710 |
}
|
| 711 |
return $rowset;
|
| 712 |
}
|
Filename: E:\wwwroot\st_xh\APP\Controller\indexNews.php [106]
#5 FLEA_Db_TableDataGateway::findBySql(' select * from xinwen_sort ...')
ARGS:
Array
(
[0] => select * from xinwen_sort join business on id_sort = item_business where state=0 and parent= order by click_business desc limit 10
)
SOURCE CODE:
| 96 |
{
|
| 97 |
//显示会长致辞
|
| 98 |
$WebConfig=$this->modelWebConfig->find($_GET['id']);
|
| 99 |
$data['name_business']=$WebConfig['name'];
|
| 100 |
$data['detail_business']=$WebConfig['value'];
|
| 101 |
}else
|
| 102 |
{
|
| 103 |
$data=$this->modelNews->find($_GET['id']);
|
| 104 |
$comment_num=flea::getdbo()->getone("select count(*) from comments where news_id={$_GET['id']} and state=0");
|
| 105 |
//阅读排行
|
| 106 |
$hotRead=$this->modelNews->findbysql(' select * from xinwen_sort join business on id_sort = item_business where state=0 and parent='.$data['xinwensort']['parent'].' order by click_business desc limit 10');
|
| 107 |
$viewData["hotRead"]=$hotRead;
|
| 108 |
//最新新闻
|
| 109 |
$hotNews=$this->modelNews->findbysql(' select * from xinwen_sort join business on id_sort = item_business where state=0 and parent='.$data['xinwensort']['parent'].' order by time_business desc limit 10');
|
| 110 |
$viewData["hotNews"]=$hotNews;
|
| 111 |
}
|
| 112 |
|
| 113 |
$Navigation=$this->modelMember->Navigation($data['item_business']);
|
| 114 |
$viewData["Navigation"] = $Navigation;
|
| 115 |
$viewData["data"] = $data;
|
| 116 |
$viewData["comment_num"] = $comment_num;
|
Filename: E:\wwwroot\st_xh\FLEA\FLEA\Dispatcher\Simple.php [120]
#4 Controller_indexNews::actionShowContent()
ARGS:
Array
(
)
SOURCE CODE:
| 110 |
}
|
| 111 |
if (method_exists($controller, '__setDispatcher')) {
|
| 112 |
$controller->__setDispatcher($this);
|
| 113 |
}
|
| 114 |
|
| 115 |
// 调用 _beforeExecute() 方法
|
| 116 |
if (method_exists($controller, '_beforeExecute')) {
|
| 117 |
$controller->_beforeExecute($actionMethod);
|
| 118 |
}
|
| 119 |
// 执行 action 方法
|
| 120 |
$ret = $controller->{$actionMethod}();
|
| 121 |
// 调用 _afterExecute() 方法
|
| 122 |
if (method_exists($controller, '_afterExecute')) {
|
| 123 |
$controller->_afterExecute($actionMethod);
|
| 124 |
}
|
| 125 |
return $ret;
|
| 126 |
} while (false);
|
| 127 |
|
| 128 |
if ($callback) {
|
| 129 |
// 检查是否调用应用程序设置的错误处理程序
|
| 130 |
$args = array($controllerName, $actionName, $controllerClass);
|
Filename: E:\wwwroot\st_xh\FLEA\FLEA\Dispatcher\Auth.php [127]
#3 FLEA_Dispatcher_Simple::_executeAction('indexNews', 'ShowContent', 'Controller_indexNews')
ARGS:
Array
(
[0] => indexNews
[1] => ShowContent
[2] => Controller_indexNews
)
SOURCE CODE:
| 117 |
* @return mixed
|
| 118 |
*/
|
| 119 |
function dispatching()
|
| 120 |
{
|
| 121 |
$controllerName = $this->getControllerName();
|
| 122 |
$actionName = $this->getActionName();
|
| 123 |
$controllerClass = $this->getControllerClass($controllerName);
|
| 124 |
|
| 125 |
if ($this->check($controllerName, $actionName, $controllerClass)) {
|
| 126 |
// 检查通过,执行控制器方法
|
| 127 |
return $this->_executeAction($controllerName, $actionName, $controllerClass);
|
| 128 |
} else {
|
| 129 |
// 检查失败
|
| 130 |
$callback = FLEA::getAppInf('dispatcherAuthFailedCallback');
|
| 131 |
|
| 132 |
$rawACT = $this->getControllerACT($controllerName, $controllerClass);
|
| 133 |
if (is_null($rawACT) || empty($rawACT)) { return true; }
|
| 134 |
$ACT = $this->_auth->prepareACT($rawACT);
|
| 135 |
$roles = $this->_auth->getRolesArray();
|
| 136 |
$args = array($controllerName, $actionName, $controllerClass, $ACT, $roles);
|
| 137 |
|
Filename: E:\wwwroot\st_xh\FLEA\FLEA.php [816]
#2 FLEA_Dispatcher_Auth::dispatching()
ARGS:
Array
(
)
SOURCE CODE:
| 806 |
require_once($MVCPackageFilename);
|
| 807 |
}
|
| 808 |
FLEA::init();
|
| 809 |
|
| 810 |
// 载入调度器并转发请求到控制器
|
| 811 |
$dispatcherClass = FLEA::getAppInf('dispatcher');
|
| 812 |
FLEA::loadClass($dispatcherClass);
|
| 813 |
|
| 814 |
$dispatcher =& new $dispatcherClass($_GET);
|
| 815 |
FLEA::register($dispatcher, $dispatcherClass);
|
| 816 |
$dispatcher->dispatching();
|
| 817 |
}
|
| 818 |
|
| 819 |
/**
|
| 820 |
* 准备运行环境
|
| 821 |
*
|
| 822 |
* @param boolean $loadMVC
|
| 823 |
*/
|
| 824 |
function init($loadMVC = false)
|
| 825 |
{
|
| 826 |
static $firstTime = true;
|
Filename: E:\wwwroot\st_xh\index.php [12]
#1 FLEA::runMVC()
ARGS:
Array
(
)
SOURCE CODE:
| 2 |
include "comm/Fel_AsenFunction.php";//加载通用函数文件
|
| 3 |
date_default_timezone_set('Asia/Shanghai');//设置时区
|
| 4 |
define("COMM_DIR",str_replace("\\","/",dirname(__FILE__)."/comm"));//得到通用类路?
|
| 5 |
define("APP_DIR",dirname(__FILE__)."/APP");//得到应用程序的目?
|
| 6 |
define('NO_LEGACY_FLEAPHP',true);//代表是使用fleaphp1.0.7版本开发的
|
| 7 |
require('FLEA/FLEA.php');//加载FLEA框架入口函数
|
| 8 |
FLEA::loadAppInf('config/AppInf.php');//加载配置文件
|
| 9 |
FLEA::setAppInf(array('defaultController'=> 'index'));
|
| 10 |
FLEA::setAppInf(array('urlMode'=> URL_PATHINFO));
|
| 11 |
FLEA::import(APP_DIR);
|
| 12 |
FLEA::runMVC();
|
| 13 |
function deny(){
|
| 14 |
js_alert('Ƿʣ',null,url(admini_login));
|
| 15 |
}
|
| 16 |
?> |