Exception: FLEA_Db_Exception_SqlQuery
Message: SQL 错误消息: "Table 'product' is marked as crashed and should be repaired"
SQL 语句: "SELECT cid FROM product WHERE (`key` LIKE '%橡胶传动带%' OR name LIKE '%橡胶传动带%') GROUP BY cid"
SQL 错误代码: "7335941".
Filename: /www/w/ww/www.chengduol.com/Libs/FLEA/FLEA/Db/Driver/Abstract.php [511]
#7 FLEA_Db_Driver_Mysql::execute('SELECT cid FROM product WHE ...')
ARGS:
Array
(
[0] => SELECT cid FROM product WHERE (`key` LIKE '%橡胶传动带%' OR name LIKE '%橡胶传动带%') GROUP BY cid
)
SOURCE CODE:
| 501 |
|
| 502 |
/**
|
| 503 |
* 执行一个查询,返回查询结果记录集
|
| 504 |
*
|
| 505 |
* @param string|resource $sql
|
| 506 |
*
|
| 507 |
* @return array
|
| 508 |
*/
|
| 509 |
function & getAll($sql)
|
| 510 |
{
|
| 511 |
$res = is_resource($sql) ? $sql : $this->execute($sql);
|
| 512 |
$rowset = array();
|
| 513 |
while ($row = $this->fetchAssoc($res)) {
|
| 514 |
$rowset[] = $row;
|
| 515 |
}
|
| 516 |
$this->freeRes($res);
|
| 517 |
return $rowset;
|
| 518 |
}
|
| 519 |
|
| 520 |
/**
|
| 521 |
* 执行查询,返回第一条记录的第一个字段
|
Filename: /www/w/ww/www.chengduol.com/Libs/FLEA/FLEA/Db/TableDataGateway.php [700]
#6 FLEA_Db_Driver_Abstract::getAll('SELECT cid FROM product WHE ...')
ARGS:
Array
(
[0] => SELECT cid FROM product WHERE (`key` LIKE '%橡胶传动带%' OR name LIKE '%橡胶传动带%') GROUP BY cid
)
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: /www/w/ww/www.chengduol.com/App/Controller/Search.php [49]
#5 FLEA_Db_TableDataGateway::findBySql('SELECT cid FROM product WHE ...')
ARGS:
Array
(
[0] => SELECT cid FROM product WHERE (`key` LIKE '%橡胶传动带%' OR name LIKE '%橡胶传动带%') GROUP BY cid
)
SOURCE CODE:
| 39 |
}
|
| 40 |
|
| 41 |
switch($searchType){
|
| 42 |
case 2:
|
| 43 |
if(!$smarty->is_cached('OutSearch_'.$searchType.'.html',$CacheId)) {
|
| 44 |
$tableProduct =& FLEA::getSingleton('Table_Product');
|
| 45 |
$meta = $city.$searchKey."批发市场,".$city.$searchKey."价格,".$city.$searchKey."生产厂商";
|
| 46 |
if($searchCity) $sqlwhere = " AND city=".$tableProduct->qstr($searchCity);
|
| 47 |
$Conditions = "(`key` LIKE ".$tableProduct->qstr($sqlKey)." OR name LIKE ".$tableProduct->qstr($sqlKey).") $sqlwhere";
|
| 48 |
$sort = "elitetype DESC,producttime DESC";
|
| 49 |
$corrClass = $tableProduct->findBySql("SELECT cid FROM product WHERE $Conditions GROUP BY cid");
|
| 50 |
$totalCount = $tableProduct->findCount($Conditions);
|
| 51 |
$multipage = multi($totalCount,$tpp,$page,$topage,true);
|
| 52 |
$data = $tableProduct->findAll($Conditions,$sort,array($tpp,$start_limit),'id,name,cid,intro,key,picname,city');
|
| 53 |
if(count($corrClass)){
|
| 54 |
foreach(array_slice($corrClass,0,20) AS $value){
|
| 55 |
$tmp = $Cache->getClassInfo($value['cid']);
|
| 56 |
if($tmp['name']) $correlation[$value['cid']] = array('name'=>$tmp['name']);
|
| 57 |
}
|
| 58 |
}
|
| 59 |
}
|
Filename: /www/w/ww/www.chengduol.com/Libs/FLEA/FLEA/Dispatcher/Simple.php [120]
#4 Controller_Search::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: /www/w/ww/www.chengduol.com/Libs/FLEA/FLEA/Dispatcher/Simple.php [77]
#3 FLEA_Dispatcher_Simple::_executeAction('Search', 'index', 'Controller_Search')
ARGS:
Array
(
[0] => Search
[1] => index
[2] => Controller_Search
)
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: /www/w/ww/www.chengduol.com/Libs/FLEA/FLEA.php [803]
#2 FLEA_Dispatcher_Simple::dispatching()
ARGS:
Array
(
)
SOURCE CODE:
| 793 |
require_once($MVCPackageFilename);
|
| 794 |
}
|
| 795 |
FLEA::init();
|
| 796 |
|
| 797 |
// 载入调度器并转发请求到控制器
|
| 798 |
$dispatcherClass = FLEA::getAppInf('dispatcher');
|
| 799 |
FLEA::loadClass($dispatcherClass);
|
| 800 |
|
| 801 |
$dispatcher =& new $dispatcherClass($_GET);
|
| 802 |
FLEA::register($dispatcher, $dispatcherClass);
|
| 803 |
$dispatcher->dispatching();
|
| 804 |
}
|
| 805 |
|
| 806 |
/**
|
| 807 |
* 准备运行环境
|
| 808 |
*
|
| 809 |
* @param boolean $loadMVC
|
| 810 |
*/
|
| 811 |
function init($loadMVC = false)
|
| 812 |
{
|
| 813 |
static $firstTime = true;
|
Filename: /www/w/ww/www.chengduol.com/index.php [27]
#1 FLEA::runMVC()
ARGS:
Array
(
)
SOURCE CODE:
| 17 |
'compile_dir' => APP_ROOT . '/Caches/Templates_c',
|
| 18 |
'config_dir' => APP_ROOT . '/Caches/Configs',
|
| 19 |
'cache_dir' => APP_ROOT . '/Caches/Cache',
|
| 20 |
'left_delimiter' => '<!--{',
|
| 21 |
'right_delimiter' => '}-->',
|
| 22 |
);
|
| 23 |
|
| 24 |
FLEA::setAppInf('viewConfig',$viewConfig);
|
| 25 |
FLEA::setAppInf('controllerAccessor','c');
|
| 26 |
FLEA::import(APP_ROOT . '/App');
|
| 27 |
FLEA::runMVC();
|
| 28 |
?> |