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 product_id != ORDER BY rand()
LIMIT 4' at line 3"
SQL 语句: "SELECT `en_product`.`product_id` AS flea_pkref_product_id, `en_product`.*
FROM `en_product`
WHERE productcat_id= AND product_id != ORDER BY rand()
LIMIT 4"
SQL 错误代码: "7335941".
Filename: /usr/local/apache/htdocs/FLEA/FLEA/Db/Driver/Mysql.php
#8
flea_db_exception_sqlquery::flea_db_exception_sqlquery('SELECT `en_product`.`produc ...', 'You have an error in your S ...', 1064)
FILE: Mysql.php
LINE: 230
ARGS:
Array
(
[0] => SELECT `en_product`.`product_id` AS flea_pkref_product_id, `en_product`.*
FROM `en_product`
WHERE productcat_id= AND product_id != ORDER BY rand()
LIMIT 4
[1] => 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 product_id != ORDER BY rand()
LIMIT 4' at line 3
[2] => 1064
)
SOURCE CODE:
| 220 |
if ($result !== false) {
|
| 221 |
$this->lasterr = null;
|
| 222 |
$this->lasterrcode = null;
|
| 223 |
return $result;
|
| 224 |
}
|
| 225 |
$this->lasterr = mysql_error($this->conn);
|
| 226 |
$this->lasterrcode = mysql_errno($this->conn);
|
| 227 |
if (!$throw) { return false; }
|
| 228 |
|
| 229 |
FLEA::loadClass('FLEA_Db_Exception_SqlQuery');
|
| 230 |
__THROW(new FLEA_Db_Exception_SqlQuery($sql, $this->lasterr, $this->lasterrcode));
|
| 231 |
return false;
|
| 232 |
}
|
| 233 |
|
| 234 |
/**
|
| 235 |
* 转义字符串
|
| 236 |
*
|
| 237 |
* @param string $value
|
| 238 |
*
|
| 239 |
* @return mixed
|
| 240 |
*/
|
Filename: /usr/local/apache/htdocs/FLEA/FLEA/Db/Driver/Mysql.php
#7
flea_db_driver_mysql::execute('SELECT `en_product`.`produc ...')
FILE: Mysql.php
LINE: 459
ARGS:
Array
(
[0] => SELECT `en_product`.`product_id` AS flea_pkref_product_id, `en_product`.*
FROM `en_product`
WHERE productcat_id= AND product_id != ORDER BY rand()
LIMIT 4
)
SOURCE CODE:
| 449 |
if ($offset !== null) {
|
| 450 |
$sql .= "\nLIMIT " . (int)$offset;
|
| 451 |
if ($length !== null) {
|
| 452 |
$sql .= ', ' . (int)$length;
|
| 453 |
} else {
|
| 454 |
$sql .= ', 4294967294';
|
| 455 |
}
|
| 456 |
} elseif ($length !== null) {
|
| 457 |
$sql .= "\nLIMIT " . (int)$length;
|
| 458 |
}
|
| 459 |
return $this->execute($sql);
|
| 460 |
}
|
| 461 |
|
| 462 |
/**
|
| 463 |
* 执行一个查询,返回查询结果记录集
|
| 464 |
*
|
| 465 |
* @param string|resource $sql
|
| 466 |
*
|
| 467 |
* @return array
|
| 468 |
*/
|
| 469 |
function & getAll($sql)
|
Filename: /usr/local/apache/htdocs/FLEA/FLEA/Db/TableDataGateway.php
#6
flea_db_driver_mysql::selectlimit('SELECT `en_product`.`produc ...', 4, )
FILE: TableDataGateway.php
LINE: 395
ARGS:
Array
(
[0] => SELECT `en_product`.`product_id` AS flea_pkref_product_id, `en_product`.*
FROM `en_product`
WHERE productcat_id= AND product_id != ORDER BY rand()
[1] => 4
[2] =>
)
SOURCE CODE:
| 385 |
$fields = $this->dbo->qfields($fields, $this->fullTableName);
|
| 386 |
if ($enableLinks) {
|
| 387 |
// 当有关联需要处理时,必须获得主表的主键字段值
|
| 388 |
$sql = "SELECT {$distinct}{$this->qpka}, {$fields}\nFROM {$this->qtableName}{$whereby}{$sortby}";
|
| 389 |
} else {
|
| 390 |
$sql = "SELECT {$distinct}{$fields}\nFROM {$this->qtableName}{$whereby}{$sortby}";
|
| 391 |
}
|
| 392 |
|
| 393 |
// 根据 $length 和 $offset 参数决定是否使用限定结果集的查询
|
| 394 |
if (null !== $length || null !== $offset) {
|
| 395 |
$result = $this->dbo->selectLimit($sql, $length, $offset);
|
| 396 |
} else {
|
| 397 |
$result = $this->dbo->execute($sql);
|
| 398 |
}
|
| 399 |
|
| 400 |
if ($enableLinks) {
|
| 401 |
/**
|
| 402 |
* 查询时同时将主键值单独提取出来,
|
| 403 |
* 并且准备一个以主键值为键名的二维数组用于关联数据的装配
|
| 404 |
*/
|
| 405 |
$pkvs = array();
|
Filename: /usr/local/apache/htdocs/APP/NewController/Default.php
#5
table_producten::findall('productcat_id= AND product_ ...', , 4)
FILE: Default.php
LINE: 308
ARGS:
Array
(
[0] => productcat_id= AND product_id != ORDER BY rand()
[1] =>
[2] => 4
)
SOURCE CODE:
| 298 |
"Card Slots" =>"card_slots",
|
| 299 |
"Searching Engine" =>"searching_engine",
|
| 300 |
"Standard built-in" =>"standard_builtin",
|
| 301 |
"Authoritative dictionaries"=>"authoritative_dictionaries",
|
| 302 |
"Animation dictionary" =>"animation_dictionary",
|
| 303 |
// "Market date" =>"market_date"
|
| 304 |
);
|
| 305 |
|
| 306 |
$table =& $_modelProduct->getTable();
|
| 307 |
$condition = "productcat_id=$product[productcat_id] AND product_id != $product[product_id] ORDER BY rand()";
|
| 308 |
$more = $table->findAll($condition,null,4);
|
| 309 |
|
| 310 |
$nav = "Home>> product>>".$product['brand_name'];
|
| 311 |
|
| 312 |
include $this->htmlDir . "productshow.php";
|
| 313 |
|
| 314 |
}
|
| 315 |
|
| 316 |
function actionFAQ(){
|
| 317 |
$_modelNews =& FLEA::getSingleton('Model_Newsen');
|
| 318 |
$table =& $_modelNews->getTable();
|
Filename: /usr/local/apache/htdocs/FLEA/FLEA/Dispatcher/Simple.php
#4
newcontroller_default::actionprshow()
FILE: Simple.php
LINE: 127
ARGS:
Array
(
)
SOURCE CODE:
| 117 |
}
|
| 118 |
if (method_exists($controller, '__setDispatcher')) {
|
| 119 |
$controller->__setDispatcher($this);
|
| 120 |
}
|
| 121 |
|
| 122 |
// 调用 _beforeExecute() 方法
|
| 123 |
if (method_exists($controller, '_beforeExecute')) {
|
| 124 |
$controller->_beforeExecute($actionMethod);
|
| 125 |
}
|
| 126 |
// 执行 action 方法
|
| 127 |
$ret = $controller->{$actionMethod}();
|
| 128 |
// 调用 _afterExecute() 方法
|
| 129 |
if (method_exists($controller, '_afterExecute')) {
|
| 130 |
$controller->_afterExecute($actionMethod);
|
| 131 |
}
|
| 132 |
return $ret;
|
| 133 |
} while (false);
|
| 134 |
|
| 135 |
if ($callback) {
|
| 136 |
// 检查是否调用应用程序设置的错误处理程序
|
| 137 |
$args = array($controllerName, $actionName, $controllerClass);
|
Filename: /usr/local/apache/htdocs/FLEA/FLEA/Dispatcher/Auth.php
#3
flea_dispatcher_auth::_executeaction('Default', 'Prshow', 'NewController_Default')
FILE: Auth.php
LINE: 127
ARGS:
Array
(
[0] => Default
[1] => Prshow
[2] => NewController_Default
)
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 ($rawACT == null || empty($rawACT)) { return true; }
|
| 134 |
$ACT = $this->_auth->prepareACT($rawACT);
|
| 135 |
$roles = $this->_auth->getRolesArray();
|
| 136 |
|
| 137 |
if ($callback) {
|
Filename: /usr/local/apache/htdocs/FLEA/FLEA.php
#2
flea_dispatcher_auth::dispatching()
FILE: FLEA.php
LINE: 644
ARGS:
Array
(
)
SOURCE CODE:
| 634 |
require_once($MVCPackageFilename);
|
| 635 |
}
|
| 636 |
FLEA::init();
|
| 637 |
|
| 638 |
// 载入调度器并转发请求到控制器
|
| 639 |
$dispatcherClass = FLEA::getAppInf('dispatcher');
|
| 640 |
FLEA::loadClass($dispatcherClass);
|
| 641 |
|
| 642 |
$dispatcher =& new $dispatcherClass($_GET);
|
| 643 |
FLEA::register($dispatcher, $dispatcherClass);
|
| 644 |
$dispatcher->dispatching();
|
| 645 |
}
|
| 646 |
|
| 647 |
/**
|
| 648 |
* 准备运行环境
|
| 649 |
*
|
| 650 |
* @param boolean $loadMVC
|
| 651 |
*/
|
| 652 |
function init($loadMVC = false)
|
| 653 |
{
|
| 654 |
static $firstTime = true;
|
Filename: /usr/local/apache/htdocs/index.php
#1
flea::runmvc()
FILE: index.php
LINE: 41
ARGS:
Array
(
)
SOURCE CODE:
| 31 |
if( $_SERVER["SERVER_NAME"] == 'en.noahedu.com.cn'){
|
| 32 |
FLEA::setAppInf('controllerClassPrefix', 'NewController_');
|
| 33 |
}
|
| 34 |
if( $_SERVER["SERVER_NAME"] == 'www.eyoor.cn' || $_SERVER["SERVER_NAME"] == 'eyoor.cn'){
|
| 35 |
require('./eyoor/index.php');
|
| 36 |
exit;
|
| 37 |
}
|
| 38 |
FLEA::loadFile('lib_functions.php');
|
| 39 |
|
| 40 |
FLEA::import(BASE_DIR . '/APP');
|
| 41 |
FLEA::runMVC(); |