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 'order by sav_time desc' at line 1"
SQL : "select * from zs_saving_note where sav_ip ='38.103.63.16' and mer_id = order by sav_time desc"
SQL Error code: "7335941".
Filename: F:\freehost\lm29723949\web\libs\FLEA\FLEA\Db\Driver\Abstract.php [544]
#8 FLEA_Db_Driver_Mysql::execute('select * from zs_saving_not ...')
ARGS:
Array
(
[0] => select * from zs_saving_note where sav_ip ='38.103.63.16' and mer_id = order by sav_time desc
)
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: F:\freehost\lm29723949\web\libs\FLEA\FLEA\Db\TableDataGateway.php [700]
#7 FLEA_Db_Driver_Abstract::getAll('select * from zs_saving_not ...')
ARGS:
Array
(
[0] => select * from zs_saving_note where sav_ip ='38.103.63.16' and mer_id = order by sav_time desc
)
SOURCE CODE:
| 690 |
function & findBySql($sql, $limit = null)
|
| 691 |
{
|
| 692 |
// 处理 $limit
|
| 693 |
if (is_array($limit)) {
|
| 694 |
list($length, $offset) = $limit;
|
| 695 |
} else {
|
| 696 |
$length = $limit;
|
| 697 |
$offset = null;
|
| 698 |
}
|
| 699 |
if (is_null($length) && is_null($offset)) {
|
| 700 |
return $this->dbo->getAll($sql);
|
| 701 |
}
|
| 702 |
|
| 703 |
$result = $this->dbo->selectLimit($sql, $length, $offset);
|
| 704 |
if ($result) {
|
| 705 |
$rowset = $this->dbo->getAll($result);
|
| 706 |
} else {
|
| 707 |
$rowset = false;
|
| 708 |
}
|
| 709 |
return $rowset;
|
| 710 |
}
|
Filename: F:\freehost\lm29723949\web\libs\APP\Site\Model\Merchant.php [30]
#6 FLEA_Db_TableDataGateway::findBySql('select * from zs_saving_not ...')
ARGS:
Array
(
[0] => select * from zs_saving_note where sav_ip ='38.103.63.16' and mer_id = order by sav_time desc
)
SOURCE CODE:
| 20 |
$charge = (sizeof($f) >2 ) ? 1: 0;
|
| 21 |
//echo "sou fei:".$charge."<br>"; echo "time is:".$Now."<br>";
|
| 22 |
|
| 23 |
$room_id = $_GET['id'];
|
| 24 |
$sql = "select mer_id from zs_merchant where mer_regdate = '". $room_id ."'";
|
| 25 |
$mm = $this->findBysql($sql);
|
| 26 |
$merid = $mm[0]['mer_id'];
|
| 27 |
unset($mm);
|
| 28 |
|
| 29 |
$sql = "select * from zs_saving_note where sav_ip ='". $myip ."' and mer_id = ".$merid ." order by sav_time desc";
|
| 30 |
$charge_event = $this->findBysql($sql);
|
| 31 |
|
| 32 |
if(sizeof($charge_event) >= 1){
|
| 33 |
$charge_time = $charge_event[0]['sav_time']; //echo $charge_time;
|
| 34 |
$protime_ary=explode(' ',$charge_time); $protime_d=explode('-',$protime_ary[0]); $protime_t=explode(':',$protime_ary[1]); unset($protime_ary);
|
| 35 |
|
| 36 |
if(count($protime_t)<=1)$protime_t=array(0,0,0); if(count($protime_d)<=1)$protime_d=array(1997,1,1);
|
| 37 |
$protime=mktime($protime_t[0],$protime_t[1],$protime_t[2],$protime_d[1],$protime_d[2],$protime_d[0]);
|
| 38 |
//echo "<br>"; echo round((time()+60 * 60 *8 - $protime)/3600);
|
| 39 |
|
| 40 |
if($charge ==1 ){ if( (time()+60 * 60 *8 - $protime)> 3600 * 6 ) { $this->docharge($myip); //echo "<br>yao kou fei<br>";
|
Filename: F:\freehost\lm29723949\web\libs\APP\Site\Controller\Merchant.php [14]
#5 Model_Merchant::Model_select()
ARGS:
Array
(
)
SOURCE CODE:
| 4 |
var $_modelMerchant;
|
| 5 |
var $_Root;
|
| 6 |
|
| 7 |
function __construct(){
|
| 8 |
$this->_modelMerchant =& FLEA::getSingleton('Model_Merchant');
|
| 9 |
$this->_Root = $GLOBALS['STIEWEB_CONFIG']['DOCUMENT_ROOT'] . DS . 'libs' . DS . 'APP' . DS . 'Site' . DS . 'View' . DS;
|
| 10 |
}
|
| 11 |
|
| 12 |
function actionindex(){
|
| 13 |
|
| 14 |
$merchant = $this->_modelMerchant->Model_select();
|
| 15 |
include_once($this->_Root . 'Merchant.html');
|
| 16 |
unset($merchant);
|
| 17 |
}
|
| 18 |
|
| 19 |
function actioncheckname(){
|
| 20 |
$this->_modelMerchant->Model_checkname();
|
| 21 |
}
|
| 22 |
|
| 23 |
function actionreg(){
|
| 24 |
$merchant = $this->_modelMerchant->Model_reg();
|
Filename: F:\freehost\lm29723949\web\libs\FLEA\FLEA\Dispatcher\Simple.php [120]
#4 Controller_Merchant::actionindex()
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: F:\freehost\lm29723949\web\libs\FLEA\FLEA\Dispatcher\Simple.php [77]
#3 FLEA_Dispatcher_Simple::_executeAction('merchant', 'index', 'Controller_merchant')
ARGS:
Array
(
[0] => merchant
[1] => index
[2] => Controller_merchant
)
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: F:\freehost\lm29723949\web\libs\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: F:\freehost\lm29723949\web\a.php [32]
#1 FLEA::runMVC()
ARGS:
Array
(
)
SOURCE CODE:
| 22 |
'controllerAccessor' => $GLOBALS['STIEWEB_CONFIG']['controllerAccessor'],
|
| 23 |
|
| 24 |
'actionAccessor' => $GLOBALS['STIEWEB_CONFIG']['actionAccessor']
|
| 25 |
|
| 26 |
);
|
| 27 |
FLEA::loadAppInf($appInf);
|
| 28 |
|
| 29 |
|
| 30 |
FLEA::import(STIEAPP_DIR);
|
| 31 |
|
| 32 |
FLEA::runMVC();
|
| 33 |
?> |