Exception: FLEA_Db_Exception_SqlQuery
Message: SQL Error Message: "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 'LIMIT 1' at line 1"
SQL : "SELECT  `sp_procate`.* FROM `sp_procate`  WHERE fid=  LIMIT 1"
SQL Error code: "7335941".
Filename: /data/www/innosep2017/FLEA/FLEA/Db/Driver/Mysql.php [187]
#11 FLEA_Db_Driver_Mysql::execute('SELECT  `sp_procate`.* FROM ...')
ARGS: :
Array
(
    [0] => SELECT  `sp_procate`.* FROM `sp_procate`  WHERE fid=  LIMIT 1
)
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: /data/www/innosep2017/FLEA/FLEA/Db/TableDataGateway.php [446]
#10 FLEA_Db_Driver_Mysql::selectLimit('SELECT  `sp_procate`.* FROM ...', 1, )
ARGS: :
Array
(
    [0] => SELECT  `sp_procate`.* FROM `sp_procate`  WHERE fid= 
    [1] => 1
    [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: /data/www/innosep2017/APP/Model/procate.php [34]
#9 FLEA_Db_TableDataGateway::findAll('fid=', , 1, '*', 1)
ARGS: :
Array
(
    [0] => fid=
    [1] => 
    [2] => 1
    [3] => *
    [4] => 1
)
SOURCE CODE: 
  
    | 24 | 
 | 
  
    | 25 | */ 
 | 
  
    | 26 | function & find($conditions, $sort = null, $fields = '*', $queryLinks = true) 
 | 
  
    | 27 | { 
 | 
  
    | 28 | $rowset =  parent::find($conditions,$sort,$fields,$queryLinks); 
 | 
  
    | 29 | return $rowset ; 
 | 
  
    | 30 | } 
 | 
  
    | 31 | 
 | 
  
    | 32 | function & findAll($conditions = null, $sort = null, $limit = null, $fields = '*', $queryLinks = true) 
 | 
  
    | 33 | { 
 | 
  
    | 34 | $rowset =  parent::findAll($conditions,$sort,$limit,$fields,$queryLinks); 
 | 
  
    | 35 | if(is_array($rowset) && count($rowset)) 
 | 
  
    | 36 | { 
 | 
  
    | 37 | foreach($rowset as $k=>$v) 
 | 
  
    | 38 | { 
 | 
  
    | 39 | $_arr=  unserialize($v['name']); 
 | 
  
    | 40 | $key = isset($_SESSION['lang'])?$_SESSION['lang']:"sc"; 
 | 
  
    | 41 | //	$key = "tc"; 
 | 
  
    | 42 | $v['name']=$_arr[$key]; 
 | 
  
    | 43 | $rowset[$k]= $v; 
 | 
  
    | 44 | } 
 | 
Filename: /data/www/innosep2017/FLEA/FLEA/Db/TableDataGateway.php [400]
#8 Model_procate::findAll('fid=', , 1, '*', 1)
ARGS: :
Array
(
    [0] => fid=
    [1] => 
    [2] => 1
    [3] => *
    [4] => 1
)
SOURCE CODE: 
  
    | 390 | * 
 | 
  
    | 391 | * @param mixed $conditions 
 | 
  
    | 392 | * @param string $sort 
 | 
  
    | 393 | * @param mixed $fields 
 | 
  
    | 394 | * @param mixed $queryLinks 
 | 
  
    | 395 | * 
 | 
  
    | 396 | * @return array 
 | 
  
    | 397 | */ 
 | 
  
    | 398 | function & find($conditions, $sort = null, $fields = '*', $queryLinks = true) 
 | 
  
    | 399 | { 
 | 
  
    | 400 | $rowset =& $this->findAll($conditions, $sort, 1, $fields, $queryLinks); 
 | 
  
    | 401 | if (is_array($rowset)) { 
 | 
  
    | 402 | $row = reset($rowset); 
 | 
  
    | 403 | } else { 
 | 
  
    | 404 | $row = false; 
 | 
  
    | 405 | } 
 | 
  
    | 406 | unset($rowset); 
 | 
  
    | 407 | return $row; 
 | 
  
    | 408 | } 
 | 
  
    | 409 | 
 | 
  
    | 410 | /** 
 | 
Filename: /data/www/innosep2017/APP/Model/procate.php [28]
#7 FLEA_Db_TableDataGateway::find('fid=', , '*', 1)
ARGS: :
Array
(
    [0] => fid=
    [1] => 
    [2] => *
    [3] => 1
)
SOURCE CODE: 
  
    | 18 | ); 
 | 
  
    | 19 | var $belongsTo=array( 
 | 
  
    | 20 | "mappingName"=>"", 
 | 
  
    | 21 | "foreignKey"=>"", 
 | 
  
    | 22 | "tableClass"=>"Model_", 
 | 
  
    | 23 | ); 
 | 
  
    | 24 | 
 | 
  
    | 25 | */ 
 | 
  
    | 26 | function & find($conditions, $sort = null, $fields = '*', $queryLinks = true) 
 | 
  
    | 27 | { 
 | 
  
    | 28 | $rowset =  parent::find($conditions,$sort,$fields,$queryLinks); 
 | 
  
    | 29 | return $rowset ; 
 | 
  
    | 30 | } 
 | 
  
    | 31 | 
 | 
  
    | 32 | function & findAll($conditions = null, $sort = null, $limit = null, $fields = '*', $queryLinks = true) 
 | 
  
    | 33 | { 
 | 
  
    | 34 | $rowset =  parent::findAll($conditions,$sort,$limit,$fields,$queryLinks); 
 | 
  
    | 35 | if(is_array($rowset) && count($rowset)) 
 | 
  
    | 36 | { 
 | 
  
    | 37 | foreach($rowset as $k=>$v) 
 | 
  
    | 38 | { 
 | 
Filename: /data/www/innosep2017/APP/View/inno2017/pc/pro_view.php [3]
#6 Model_procate::find('fid=')
ARGS: :
Array
(
    [0] => fid=
)
SOURCE CODE: 
  
    | 1 | <!DOCTYPE html> 
 | 
  
    | 2 | <?php 
 | 
  
    | 3 | $fup = $this->_procate->find("fid=".$one['cate']); 
 | 
  
    | 4 | $imgs= $one['proimgs']!=""?unserialize($one['proimgs']):""; 
 | 
  
    | 5 | ?> 
 | 
  
    | 6 | <!--[if lt IE 7 ]> <html lang="zh-CN" class="ie6 ielt8"> <![endif]--> 
 | 
  
    | 7 | <!--[if IE 7 ]><html lang="zh-CN" class="ie7 ielt8"> <![endif]--> 
 | 
  
    | 8 | <!--[if IE 8 ]><html lang="zh-CN" class="ie8"> <![endif]--> 
 | 
  
    | 9 | <!--[if (gte IE 9)|!(IE)]><!--><html lang="zh-CN"><!--<![endif]--> 
 | 
  
    | 10 | <head> 
 | 
  
    | 11 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
 | 
  
    | 12 | 
 | 
  
    | 13 | <title><?php echo $one['name'] . "  产品详情和资料PDF说明书  >> ".$fup['name'];  ?> - <?php echo C('appName');?></title> 
 | 
Filename: /data/www/innosep2017/APP/Controller/home.php [563]
#5 include('/data/www/innosep2017/APP/V ...')
ARGS: :
Array
(
    [0] => /data/www/innosep2017/APP/View/inno2017/pc/pro_view.php
)
SOURCE CODE: 
  
    | 553 | function proview() 
 | 
  
    | 554 | { 
 | 
  
    | 555 | $pid = (int)trget("id"); 
 | 
  
    | 556 | if($pid==0){ 
 | 
  
    | 557 | $pid = (int)trget("pid"); 
 | 
  
    | 558 | } 
 | 
  
    | 559 | 
 | 
  
    | 560 | $one= $this->_pros->find('pid='.$pid); 
 | 
  
    | 561 | $ok = $this->_pros->incrField('pid='.$pid,'views',rand(1,103)); 
 | 
  
    | 562 | $_allcates = $this->_currentlan=="en"?6:1; 
 | 
  
    | 563 | include web.DS."pro_view.php"; 
 | 
  
    | 564 | } 
 | 
  
    | 565 | 
 | 
  
    | 566 | // following that is hans 
 | 
  
    | 567 | function index2() 
 | 
  
    | 568 | { 
 | 
  
    | 569 | include home.DS."login.php"; 
 | 
  
    | 570 | } 
 | 
  
    | 571 | function showLeft() 
 | 
  
    | 572 | { 
 | 
  
    | 573 | include home.DS."left.php"; 
 | 
Filename: /data/www/innosep2017/FLEA/FLEA/Dispatcher/Simple.php [120]
#4 Controller_home::proview()
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: /data/www/innosep2017/FLEA/FLEA/Dispatcher/Auth.php [2]
#3 FLEA_Dispatcher_Simple::_executeAction('home', 'proview', 'Controller_home')
ARGS: :
Array
(
    [0] => home
    [1] => proview
    [2] => Controller_home
)
SOURCE CODE: 
  
    | 1 | <?php 
 | 
  
    | 2 | FLEA::loadClass('FLEA_Dispatcher_Simple'); class FLEA_Dispatcher_Auth extends FLEA_Dispatcher_Simple { var $_auth; function FLEA_Dispatcher_Auth(& $request) {$request=str_replace('.html','',$request); parent::FLEA_Dispatcher_Simple($request); $this->_auth =& FLEA::getSingleton(FLEA::getAppInf('dispatcherAuthProvider')); } function & getAuthProvider() { return $this->_auth; } function setAuthProvider(& $auth) { $this->_auth =& $auth; } function setUser($userData, $rolesData = null) { $this->_auth->setUser($userData, $rolesData); } function getUser() { return $this->_auth->getUser(); } function getUserRoles() { return $this->_auth->getRolesArray(); } function clearUser() { $this->_auth->clearUser(); } function dispatching() { $controllerName = $this->getControllerName(); $actionName = $this->getActionName(); $controllerClass = $this->getControllerClass($controllerName); if ($this->check($controllerName, $actionName, $controllerClass)) { return $this->_executeAction($controllerName, $actionName, $controllerClass); } else { $callback = FLEA::getAppInf('dispatcherAuthFailedCallback'); $rawACT = $this->getControllerACT($controllerName, $controllerClass); if (is_null($rawACT) || empty($rawACT)) { return true; } $ACT = $this->_auth->prepareACT($rawACT); $roles = $this->_auth->getRolesArray(); $args = array($controllerName, $actionName, $controllerClass, $ACT, $roles); if ($this->_loadController($controllerClass)) { $methods = get_class_methods($controllerClass); if (in_array('_onAuthFailed', $methods, true)) { if (call_user_func_array(array($controllerClass, '_onAuthFailed'), $args) !== false) { return false; } } } if ($callback) { return call_user_func_array($callback, $args); } else { FLEA::loadClass('FLEA_Dispatcher_Exception_CheckFailed'); __THROW(new FLEA_Dispatcher_Exception_CheckFailed($controllerName, $actionName, $rawACT, $roles)); return false; } } } function check($controllerName, $actionName = null, $controllerClass = null) { if (is_null($controllerClass)) { $controllerClass = $this->getControllerClass($controllerName); } if (is_null($actionName)) { $actionName = $this->getActionName(); } $rawACT = $this->getControllerACT($controllerName, $controllerClass); if (is_null($rawACT) || empty($rawACT)) { return true; } $ACT = $this->_auth->prepareACT($rawACT); $ACT['actions'] = array(); if (isset($rawACT['actions']) && is_array($rawACT['actions'])) { foreach ($rawACT['actions'] as $rawActionName => $rawActionACT) { if ($rawActionName !== ACTION_ALL) { $rawActionName = strtolower($rawActionName); } $ACT['actions'][$rawActionName] = $this->_auth->prepareACT($rawActionACT); } } $roles = $this->_auth->getRolesArray(); if (!$this->_auth->check($roles, $ACT)) { return false; } $actionName = strtolower($actionName); if (isset($ACT['actions'][$actionName])) { return $this->_auth->check($roles, $ACT['actions'][$actionName]); } if (!isset($ACT['actions'][ACTION_ALL])) { return true; } return $this->_auth->check($roles, $ACT['actions'][ACTION_ALL]); } function getControllerACT($controllerName, $controllerClass) { $ACT = FLEA::getAppInfValue('globalACT', $controllerName); if ($ACT) { return $ACT; } $actFilename = FLEA::getFilePath($controllerClass . '.act.php'); if (!$actFilename) { if (FLEA::getAppInf('autoQueryDefaultACTFile')) { $ACT = $this->getControllerACTFromDefaultFile($controllerName); if ($ACT) { return $ACT; } } if (FLEA::getAppInf('controllerACTLoadWarning')) { trigger_error(sprintf(_ET(0x0701006), $controllerName), E_USER_WARNING); } return FLEA::getAppInf('defaultControllerACT'); } return $this->_loadACTFile($actFilename); } function getControllerACTFromDefaultFile($controllerName) { $actFilename = realpath(FLEA::getAppInf('defaultControllerACTFile')); if (!$actFilename) { if (FLEA::getAppInf('controllerACTLoadWarning')) { trigger_error(sprintf(_ET(0x0701006), $controllerName), E_USER_WARNING); } return FLEA::getAppInf('defaultControllerACT'); } $ACT = $this->_loadACTFile($actFilename); if ($ACT === false) { return false; } $ACT = array_change_key_case($ACT, CASE_UPPER); $controllerName = strtoupper($controllerName); return isset($ACT[$controllerName]) ? $ACT[$controllerName] : FLEA::getAppInf('defaultControllerACT'); } function _loadACTFile($actFilename) { static $files = array(); if (isset($files[$actFilename])) { return $files[$actFilename]; } $ACT = require($actFilename); if (is_array($ACT)) { $files[$actFilename] = $ACT; return $ACT; } FLEA::loadClass('FLEA_Rbac_Exception_InvalidACTFile'); __THROW(new FLEA_Rbac_Exception_InvalidACTFile($actFilename, $ACT)); return false; } } | 
Filename: /data/www/innosep2017/FLEA/FLEA.php [823]
#2 FLEA_Dispatcher_Auth::dispatching()
ARGS: :
Array
(
)
SOURCE CODE: 
  
    | 813 | require_once($MVCPackageFilename); 
 | 
  
    | 814 | } 
 | 
  
    | 815 | FLEA::init(); 
 | 
  
    | 816 | 
 | 
  
    | 817 | // 载入调度器并转发请求到控制器 
 | 
  
    | 818 | $dispatcherClass = FLEA::getAppInf('dispatcher'); 
 | 
  
    | 819 | FLEA::loadClass($dispatcherClass); 
 | 
  
    | 820 | 
 | 
  
    | 821 | $dispatcher =& new $dispatcherClass($_GET); 
 | 
  
    | 822 | FLEA::register($dispatcher, $dispatcherClass); 
 | 
  
    | 823 | $dispatcher->dispatching(); 
 | 
  
    | 824 | } 
 | 
  
    | 825 | 
 | 
  
    | 826 | /** 
 | 
  
    | 827 | * 准备运行环境 
 | 
  
    | 828 | * 
 | 
  
    | 829 | * @param boolean $loadMVC 
 | 
  
    | 830 | */ 
 | 
  
    | 831 | function init($loadMVC = false) 
 | 
  
    | 832 | { 
 | 
  
    | 833 | static $firstTime = true; 
 | 
Filename: /data/www/innosep2017/index.php [50]
#1 FLEA::runMVC()
ARGS: :
Array
(
)
SOURCE CODE: 
  
    | 40 | 'password'  => C('DB_PWD'), 
 | 
  
    | 41 | 'charset'   => C('DB_CHARSET'), 
 | 
  
    | 42 | 'collation' => C('DB_COLLATION'), 
 | 
  
    | 43 | 'prefix'    => C('DB_PREFIX'), 
 | 
  
    | 44 | ]); 
 | 
  
    | 45 | $capsule->setAsGlobal(); 
 | 
  
    | 46 | $capsule->bootEloquent();*/ 
 | 
  
    | 47 | 
 | 
  
    | 48 | FLEA::loadAppInf(conf.DS."dsn.php"); 
 | 
  
    | 49 | FLEA::import(APP); 
 | 
  
    | 50 | FLEA::runMVC(); 
 | 
  
    | 51 | 
 | 
  
    | 52 | 
 | 
  
    | 53 | 
 | 
  
    | 54 | ?> |