Exception: FLEA_Db_Exception_SqlQuery
Message: SQL 错误消息: "Table 'product' is marked as crashed and should be repaired"
SQL 语句: "SELECT COUNT(`product`.`id`) FROM `product` WHERE catalogpath LIKE '0,7,%'"
SQL 错误代码: "7335941".
Filename: /www/w/ww/www.chengduol.com/Libs/FLEA/FLEA/Db/Driver/Abstract.php [529]
#7 FLEA_Db_Driver_Mysql::execute('SELECT COUNT(`product`.`id` ...')
ARGS:
Array
(
[0] => SELECT COUNT(`product`.`id`) FROM `product` WHERE catalogpath LIKE '0,7,%'
)
SOURCE CODE:
| 519 |
|
| 520 |
/**
|
| 521 |
* 执行查询,返回第一条记录的第一个字段
|
| 522 |
*
|
| 523 |
* @param string|resource $sql
|
| 524 |
*
|
| 525 |
* @return mixed
|
| 526 |
*/
|
| 527 |
function getOne($sql)
|
| 528 |
{
|
| 529 |
$res = is_resource($sql) ? $sql : $this->execute($sql);
|
| 530 |
$row = $this->fetchRow($res);
|
| 531 |
$this->freeRes($res);
|
| 532 |
return isset($row[0]) ? $row[0] : null;
|
| 533 |
}
|
| 534 |
|
| 535 |
/**
|
| 536 |
* 执行查询,返回第一条记录
|
| 537 |
*
|
| 538 |
* @param string|resource $sql
|
| 539 |
*
|
Filename: /www/w/ww/www.chengduol.com/Libs/FLEA/FLEA/Db/TableDataGateway.php [729]
#6 FLEA_Db_Driver_Abstract::getOne('SELECT COUNT(`product`.`id` ...')
ARGS:
Array
(
[0] => SELECT COUNT(`product`.`id`) FROM `product` WHERE catalogpath LIKE '0,7,%'
)
SOURCE CODE:
| 719 |
*/
|
| 720 |
function findCount($conditions = null, $fields = null)
|
| 721 |
{
|
| 722 |
list($whereby, $distinct) = $this->getWhere($conditions);
|
| 723 |
if (is_null($fields)) {
|
| 724 |
$fields = $this->qpk;
|
| 725 |
} else {
|
| 726 |
$fields = $this->dbo->qfields($fields, $this->fullTableName);
|
| 727 |
}
|
| 728 |
$sql = "SELECT {$distinct}COUNT({$fields}) FROM {$this->qtableName}{$whereby}";
|
| 729 |
return (int)$this->dbo->getOne($sql);
|
| 730 |
}
|
| 731 |
|
| 732 |
/**
|
| 733 |
* 保存数据到数据库
|
| 734 |
*
|
| 735 |
* 如果数据包含主键值,则 save() 会调用 update() 来更新记录,否则调用 create() 来创建记录。
|
| 736 |
*
|
| 737 |
* @param array $row
|
| 738 |
* @param boolean $saveLinks
|
| 739 |
* @param boolean $updateCounter
|
Filename: /www/w/ww/www.chengduol.com/App/Controller/Default.php [293]
#5 FLEA_Db_TableDataGateway::findCount('catalogpath LIKE '0,7,%'')
ARGS:
Array
(
[0] => catalogpath LIKE '0,7,%'
)
SOURCE CODE:
| 283 |
$ClassPathlayer = $ClassInfo['path'];
|
| 284 |
$Conditions = "catalogpath LIKE '{$ClassPathlayer},%'";
|
| 285 |
}else{
|
| 286 |
$Conditions = "cid=".$this->classID;
|
| 287 |
}
|
| 288 |
|
| 289 |
$tableProduct =& FLEA::getSingleton('Table_Product');
|
| 290 |
$tableProduct->disableLink('classinfo');
|
| 291 |
if($this->city) $Conditions .= ' AND city='.$tableProduct->qstr($this->city);
|
| 292 |
$sort = 'elitetype DESC, producttime DESC';
|
| 293 |
$totalCount = $tableProduct->findCount($Conditions);
|
| 294 |
$start_limit= $this->page * $this->tpp;
|
| 295 |
$Product = $tableProduct->findAll($Conditions,$sort,array($this->tpp,$start_limit));
|
| 296 |
$multipage = multi($totalCount,$this->tpp,$this->page,$this->toPage,true);
|
| 297 |
$this->meta = "$city$ClassInfo[name]网,".$Product[0]['name']."价格,".$Product[count($Product)-1]['name']."生产厂商";
|
| 298 |
}
|
| 299 |
|
| 300 |
$this->smarty->assign('Product', $Product);
|
| 301 |
$this->smarty->assign('meta',$this->meta);
|
| 302 |
$this->smarty->assign('ClassCache', $ClassCache);
|
| 303 |
$this->smarty->assign('navigation',$this->navigation.$PathInfo);
|
Filename: /www/w/ww/www.chengduol.com/Libs/FLEA/FLEA/Dispatcher/Simple.php [120]
#4 Controller_Default::actionProductList()
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('Default', 'ProductList', 'Controller_Default')
ARGS:
Array
(
[0] => Default
[1] => ProductList
[2] => Controller_Default
)
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 |
?> |