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 'and id !=142 ORDER BY id desc LIMIT 10' at line 1"
SQL 语句: "SELECT `ab_articles`.* FROM `ab_articles` WHERE type = and id !=142 ORDER BY id desc LIMIT 10"
SQL 错误代码: "7335941".
Filename: D:\wwwroot\zhirong1230\wwwroot\xinli\LIB\FLEA\FLEA\Db\Driver\Mysql.php [187]
#7 FLEA_Db_Driver_Mysql::execute('SELECT `ab_articles`.* FRO ...')
ARGS:
Array
(
[0] => SELECT `ab_articles`.* FROM `ab_articles` WHERE type = and id !=142 ORDER BY id desc LIMIT 10
)
SOURCE CODE:
177 |
if (!is_null($offset)) {
|
178 |
$sql .= " LIMIT " . (int)$offset;
|
179 |
if (!is_null($length)) {
|
180 |
$sql .= ', ' . (int)$length;
|
181 |
} else {
|
182 |
$sql .= ', 4294967294';
|
183 |
}
|
184 |
} elseif (!is_null($length)) {
|
185 |
$sql .= " LIMIT " . (int)$length;
|
186 |
}
|
187 |
return $this->execute($sql);
|
188 |
}
|
189 |
|
190 |
function metaColumns($table)
|
191 |
{
|
192 |
/**
|
193 |
* C CHAR 或 VARCHAR 类型字段
|
194 |
* X TEXT 或 CLOB 类型字段
|
195 |
* B 二进制数据(BLOB)
|
196 |
* N 数值或者浮点数
|
197 |
* D 日期
|
Filename: D:\wwwroot\zhirong1230\wwwroot\xinli\LIB\FLEA\FLEA\Db\TableDataGateway.php [446]
#6 FLEA_Db_Driver_Mysql::selectLimit('SELECT `ab_articles`.* FRO ...', 10, )
ARGS:
Array
(
[0] => SELECT `ab_articles`.* FROM `ab_articles` WHERE type = and id !=142 ORDER BY id desc
[1] => 10
[2] =>
)
SOURCE CODE:
436 |
$fields = $this->dbo->qfields($fields, $this->fullTableName, $this->schema);
|
437 |
if ($enableLinks) {
|
438 |
// 当有关联需要处理时,必须获得主表的主键字段值
|
439 |
$sql = "SELECT {$distinct} {$this->qpka}, {$fields} FROM {$this->qtableName} {$whereby} {$sortby}";
|
440 |
} else {
|
441 |
$sql = "SELECT {$distinct} {$fields} FROM {$this->qtableName} {$whereby} {$sortby}";
|
442 |
}
|
443 |
|
444 |
// 根据 $length 和 $offset 参数决定是否使用限定结果集的查询
|
445 |
if (null !== $length || null !== $offset) {
|
446 |
$result = $this->dbo->selectLimit($sql, $length, $offset);
|
447 |
} else {
|
448 |
$result = $this->dbo->execute($sql);
|
449 |
}
|
450 |
|
451 |
if ($enableLinks) {
|
452 |
/**
|
453 |
* 查询时同时将主键值单独提取出来,
|
454 |
* 并且准备一个以主键值为键名的二维数组用于关联数据的装配
|
455 |
*/
|
456 |
$pkvs = array();
|
Filename: D:\wwwroot\zhirong1230\wwwroot\xinli\APP\Controller\News.php [548]
#5 FLEA_Db_TableDataGateway::findAll('type = and id !=142', 'id desc', 10)
ARGS:
Array
(
[0] => type = and id !=142
[1] => id desc
[2] => 10
)
SOURCE CODE:
538 |
$aa = strip_tags($cleancontent);
|
539 |
//var_dump($aa);exit;
|
540 |
$cleancontents = trim($aa);
|
541 |
$clear = substr($cleancontents,0,300);
|
542 |
//var_dump($clear);exit;
|
543 |
$this->smarty->assign('description',$clear);
|
544 |
$this->smarty->assign('keywords',$keywords);
|
545 |
$bannername= $this->daohang->find("id = '$type'");
|
546 |
//var_dump($bannername);exit;
|
547 |
$type_id = $bannername['id'];
|
548 |
$tuijian = $this->news->findall("type = $type_id and id !=$ids",'id desc',10);
|
549 |
foreach ($tuijian as $k=>$v)
|
550 |
{
|
551 |
$tuijian[$k]['url'] = url('News','read',array('id'=>$v['id']));
|
552 |
$tuijian[] = $tuijian[$k]['title'];
|
553 |
}
|
554 |
$this->smarty->assign("tuijian",$tuijian);
|
555 |
$this->smarty->assign(bannername,$bannername[name]);
|
556 |
$url = $mounts[0]['weburl'];
|
557 |
$urlname = "$url/index.php?controller=Default&action=read&type=$type";
|
558 |
$this->smarty->assign(bannerurl,$urlname);
|
Filename: D:\wwwroot\zhirong1230\wwwroot\xinli\LIB\FLEA\FLEA\Dispatcher\Simple.php [120]
#4 Controller_News::actionread()
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: D:\wwwroot\zhirong1230\wwwroot\xinli\LIB\FLEA\FLEA\Dispatcher\Simple.php [77]
#3 FLEA_Dispatcher_Simple::_executeAction('news', 'read', 'Controller_news')
ARGS:
Array
(
[0] => news
[1] => read
[2] => Controller_news
)
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: D:\wwwroot\zhirong1230\wwwroot\xinli\LIB\FLEA\FLEA.php [816]
#2 FLEA_Dispatcher_Simple::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: D:\wwwroot\zhirong1230\wwwroot\xinli\index.php [20]
#1 FLEA::runMVC()
ARGS:
Array
(
)
SOURCE CODE:
10 |
if($closesystem ==1)
|
11 |
{
|
12 |
echo "<div align=\"center\">$close_tips<a href=\"javascript:history.back();\">点击返回</a></div>";
|
13 |
}else{
|
14 |
require("./LIB/FLEA/FLEA.php");
|
15 |
FLEA::import("./APP");
|
16 |
flea::loadAppInf("./APP/Config/DSN.php");
|
17 |
define('ROOT_URL', 'http://www.abcms.net/xinli');
|
18 |
// 定义网站文件系统根目录
|
19 |
//FLEA::setAppInf('urlMode',URL_PATHINFO);
|
20 |
FLEA::runMVC();
|
21 |
}
|
22 |
}else
|
23 |
{
|
24 |
require("./LIB/FLEA/FLEA.php");
|
25 |
FLEA::import("./APP");
|
26 |
flea::loadAppInf("./APP/Config/DSN.php");
|
27 |
define('ROOT_URL', 'http://www.abcms.net/xinli');
|
28 |
// 定义网站文件系统根目录
|
29 |
//FLEA::setAppInf('urlMode',URL_PATHINFO);
|
30 |
redirect("./install/index.php");
|