Exception: FLEA_Db_Exception_SqlQuery
Message: SQL 错误消息: "Table 'ls_news' is marked as crashed and should be repaired"
SQL 语句: "select * from ls_news order by News_id desc limit 12"
SQL 错误代码: "7335941".
Filename: D:\LaoShu\daqing\FLEA\FLEA\Db\Driver\Abstract.php [544]
#7 FLEA_Db_Driver_Mysql::execute('select * from ls_news order ...')
ARGS:
Array
(
[0] => select * from ls_news order by News_id desc limit 12
)
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: D:\LaoShu\daqing\FLEA\FLEA\Db\TableDataGateway.php [702]
#6 FLEA_Db_Driver_Abstract::getAll('select * from ls_news order ...')
ARGS:
Array
(
[0] => select * from ls_news order by News_id desc limit 12
)
SOURCE CODE:
| 692 |
function & findBySql($sql, $limit = null)
|
| 693 |
{
|
| 694 |
// 处理 $limit
|
| 695 |
if (is_array($limit)) {
|
| 696 |
list($length, $offset) = $limit;
|
| 697 |
} else {
|
| 698 |
$length = $limit;
|
| 699 |
$offset = null;
|
| 700 |
}
|
| 701 |
if (is_null($length) && is_null($offset)) {
|
| 702 |
return $this->dbo->getAll($sql);
|
| 703 |
}
|
| 704 |
|
| 705 |
$result = $this->dbo->selectLimit($sql, $length, $offset);
|
| 706 |
if ($result) {
|
| 707 |
$rowset = $this->dbo->getAll($result);
|
| 708 |
} else {
|
| 709 |
$rowset = false;
|
| 710 |
}
|
| 711 |
return $rowset;
|
| 712 |
}
|
Filename: D:\LaoShu\daqing\APP\Controller\Default.php [90]
#5 FLEA_Db_TableDataGateway::findBySql('select * from ls_news order ...')
ARGS:
Array
(
[0] => select * from ls_news order by News_id desc limit 12
)
SOURCE CODE:
| 80 |
$condition = array(
|
| 81 |
array('dataname','首页 精选房源','=')
|
| 82 |
);
|
| 83 |
$adsid = $this->_dictdatas->find($condition);
|
| 84 |
$a=$adsid['dataid'];
|
| 85 |
$ads1=$this->_adset->findall(array('ads_area'=>$a),'ads_id asc');
|
| 86 |
|
| 87 |
$sql="select * from link where link_type=0 and is_pass=1 order by is_top desc limit 40";
|
| 88 |
$links=$this->_links->findbysql($sql);
|
| 89 |
$sql="select * from ls_news order by News_id desc limit 12";
|
| 90 |
$sitenews=$this->_Sitenews->findbysql($sql);
|
| 91 |
|
| 92 |
$sql="select * from city where pinyin='".$this->area_pinyin."'";
|
| 93 |
|
| 94 |
$hotcity=$this->_city->findbysql($sql);
|
| 95 |
|
| 96 |
|
| 97 |
include("APP/View/Index.php");
|
| 98 |
}
|
| 99 |
}
|
| 100 |
?> |
Filename: D:\LaoShu\daqing\FLEA\FLEA\Dispatcher\Simple.php [120]
#4 Controller_Default::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: D:\LaoShu\daqing\FLEA\FLEA\Dispatcher\Simple.php [77]
#3 FLEA_Dispatcher_Simple::_executeAction('Default', 'index', 'Controller_Default')
ARGS:
Array
(
[0] => Default
[1] => index
[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: D:\LaoShu\daqing\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: D:\LaoShu\daqing\index.php [10]
#1 FLEA::runMVC()
ARGS:
Array
(
)
SOURCE CODE:
| 1 |
<?php
|
| 2 |
$configFilename = '_Shared/DSN.php';
|
| 3 |
|
| 4 |
define('NO_LEGACY_FLEAPHP', true);
|
| 5 |
require('FLEA/FLEA.php');
|
| 6 |
|
| 7 |
FLEA::import(dirname(__FILE__) . '/APP');
|
| 8 |
FLEA::loadAppInf($configFilename);
|
| 9 |
|
| 10 |
FLEA::runMVC();
|
| 11 |
|
| 12 |
|
| 13 |
?>
|