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 id desc LIMIT 1' at line 1"
SQL 语句: "SELECT id FROM hmy_showmess WHERE id < ORDER BY id desc LIMIT 1"
SQL 错误代码: "7335941".
Filename: /usr/home/hyu1172440001/htdocs/lib/FLEA/FLEA/Db/Driver/Abstract.php [544]
#8 FLEA_Db_Driver_Mysql::execute('SELECT id FROM hmy_showmess ...')
ARGS:
Array
(
[0] => SELECT id FROM hmy_showmess WHERE id < ORDER BY id desc LIMIT 1
)
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: /usr/home/hyu1172440001/htdocs/lib/FLEA/FLEA/Db/TableDataGateway.php [702]
#7 FLEA_Db_Driver_Abstract::getAll('SELECT id FROM hmy_showmess ...')
ARGS:
Array
(
[0] => SELECT id FROM hmy_showmess WHERE id < ORDER BY id desc LIMIT 1
)
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: /usr/home/hyu1172440001/htdocs/app/controller/default.php [235]
#6 FLEA_Db_TableDataGateway::findBySql('SELECT id FROM hmy_showmess ...')
ARGS:
Array
(
[0] => SELECT id FROM hmy_showmess WHERE id < ORDER BY id desc LIMIT 1
)
SOURCE CODE:
225 |
js_alert ( '操作成功', '', $this->_url ( 'infoX',array('p'=>6) ) );
|
226 |
|
227 |
}
|
228 |
function actioncontact(){
|
229 |
$main = get_model('showmess');
|
230 |
if($_GET['id']=="1"){
|
231 |
$_GET['id']=2;
|
232 |
}
|
233 |
$this->s_assign('zc', $main->find(array('ic_id' => $_GET['id'])));//经理致词
|
234 |
|
235 |
$page1=$main->findBysql("SELECT id FROM hmy_showmess WHERE id < ".$_GET['id']." ORDER BY id desc LIMIT 1");
|
236 |
//var_dump($page1[0]['id']);
|
237 |
|
238 |
$this->s_assign('pre',$page1[0]['id']);
|
239 |
$this->s_assign('zc1', $main->find(array('id' => $_GET['id'])));
|
240 |
//var_dump($main->find(array('id' => $_GET['id'])));
|
241 |
$page2=$main->findBysql("SELECT id FROM hmy_showmess WHERE id > ".$_GET['id']." ORDER BY id ASC LIMIT 1");
|
242 |
//var_dump($page2[0]['id']);
|
243 |
$this->s_assign('next',$page2[0]['id']);
|
244 |
|
245 |
$main = get_model('infocate');
|
Filename: /usr/home/hyu1172440001/htdocs/lib/FLEA/FLEA/Dispatcher/Simple.php [120]
#5 controller_default::actioncontact()
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: /usr/home/hyu1172440001/htdocs/lib/FLEA/FLEA/Dispatcher/Simple.php [77]
#4 FLEA_Dispatcher_Simple::_executeAction('default', 'contact', 'controller_default')
ARGS:
Array
(
[0] => default
[1] => contact
[2] => controller_default
)
SOURCE CODE:
67 |
|
68 |
/**
|
69 |
* 从请求中分析 Controller、Action 和 Package 名字,然后执行指定的 Action 方法
|
70 |
*
|
71 |
* @return mixed
|
72 |
*/
|
73 |
function dispatching()
|
74 |
{
|
75 |
$controllerName = $this->getControllerName();
|
76 |
$actionName = $this->getActionName();
|
77 |
return $this->_executeAction($controllerName, $actionName, $this->getControllerClass($controllerName));
|
78 |
}
|
79 |
|
80 |
/**
|
81 |
* 执行指定的 Action 方法
|
82 |
*
|
83 |
* @param string $controllerName
|
84 |
* @param string $actionName
|
85 |
* @param string $controllerClass
|
86 |
*
|
87 |
* @return mixed
|
Filename: /usr/home/hyu1172440001/htdocs/lib/FLEA/FLEA.php [815]
#3 FLEA_Dispatcher_Simple::dispatching()
ARGS:
Array
(
)
SOURCE CODE:
805 |
require_once ($MVCPackageFilename);
|
806 |
}
|
807 |
FLEA::init ();
|
808 |
|
809 |
// 载入调度器并转发请求到控制器
|
810 |
$dispatcherClass = FLEA::getAppInf ( 'dispatcher' );
|
811 |
FLEA::loadClass ( $dispatcherClass );
|
812 |
|
813 |
$dispatcher = & new $dispatcherClass ( $_GET );
|
814 |
FLEA::register ( $dispatcher, $dispatcherClass );
|
815 |
$dispatcher->dispatching ();
|
816 |
}
|
817 |
|
818 |
/**
|
819 |
* 准备运行环境
|
820 |
*
|
821 |
* @param boolean $loadMVC
|
822 |
*/
|
823 |
function init($loadMVC = false) {
|
824 |
static $firstTime = true;
|
825 |
|
Filename: /usr/home/hyu1172440001/htdocs/lib/FLEA/FLEA/Compatibility.php [263]
#2 FLEA::runMVC()
ARGS:
Array
(
)
SOURCE CODE:
253 |
FLEA::init();
|
254 |
}
|
255 |
|
256 |
/**
|
257 |
* FLEA 应用程序入口(已经过时,用 FLEA::runMVC() 代替)
|
258 |
*
|
259 |
* @deprecated
|
260 |
*/
|
261 |
function run()
|
262 |
{
|
263 |
FLEA::runMVC();
|
264 |
}
|
265 |
|
266 |
/**
|
267 |
* 初始化 Ajax,返回 FLEA_Ajax 对象实例(已经过时,用 FLEA::initAjax() 代替)
|
268 |
*
|
269 |
* @return FLEA_Ajax
|
270 |
* @deprecated
|
271 |
*/
|
272 |
function & init_ajax()
|
273 |
{
|
Filename: /usr/home/hyu1172440001/htdocs/index.php [38]
#1 run()
ARGS:
SOURCE CODE:
28 |
)*/
|
29 |
|
30 |
);
|
31 |
|
32 |
FLEA::setAppInf('controllerAccessor', 'c');
|
33 |
FLEA::setAppInf('actionAccessor', 'a');
|
34 |
FLEA::setAppInf('logEnabled', false);//关闭日志记录
|
35 |
FLEA::loadAppInf(APP.'config/smarty_config.php');
|
36 |
FLEA::import(APP);
|
37 |
FLEA::init();
|
38 |
run();
|
39 |
?>
|