select a.* from (select id,name,brief,add_time,img,sort_id from chengshi.sp_article where is_open = 1 AND is_index = 1 AND pid = 80 union select id,name,brief,add_time,img,sort_id from wenbo.sp_article where is_open = 1 AND is_index = 1 AND pid = 80 order by sort_id ASC , add_time DESC limit 0,5) as a group by a.name order by a.sort_id ASC , a.add_time DESC
执行错误: Got error 28 from storage engine
- D:\wwwroot\ouke1\SpeedPHP\Drivers\mysql.php on line 62
57.
{
58.
$this->arrSql[] = $sql;
59.
if( $result = mysql_query($sql, $this->conn) ){
60.
return $result;
61.
}else{
62.
63.
spError("{$sql}<br />执行错误: " . mysql_error());
}
64.
}
65.
66.
/**
67.
* 返回影响行数
- D:\wwwroot\ouke1\SpeedPHP\Drivers\mysql.php on line 26
21.
*
22.
* @param sql 执行的SQL语句
23.
*/
24.
public function getArray($sql)
25.
{
26.
27.
if( ! $result = $this->exec($sql) )return array();
if( ! mysql_num_rows($result) )return array();
28.
$rows = array();
29.
while($rows[] = mysql_fetch_array($result,MYSQL_ASSOC)){}
30.
mysql_free_result($result);
31.
array_pop($rows);
- D:\wwwroot\ouke1\SpeedPHP\Core\spModel.php on line 207
202.
*
203.
* @param sql 字符串,需要进行查找的SQL语句
204.
*/
205.
public function findSql($sql)
206.
{
207.
208.
return $this->_db->getArray($sql);
}
209.
210.
/**
211.
* 执行SQL语句,相等于执行新增,修改,删除等操作。
212.
*
- D:\wwwroot\ouke1\controller\index\news.php on line 43
38.
}elseif($pid){
39.
$row = spClass('article_cate')->find($addition.'is_open=1 AND id='.$pid);
40.
if(!$row){
41.
$this->error(T('pageNotExist'), spUrl('main', 'index'));
42.
}
43.
44.
$this->news = spClass('article_list')->findSql("select a.* from (select id,name,brief,add_time,img,sort_id from chengshi.sp_article where is_open = 1 AND is_index = 1 AND pid = $pid union select id,name,brief,add_time,img,sort_id from wenbo.sp_article where is_open = 1 AND is_index = 1 AND pid = $pid order by sort_id ASC , add_time DESC limit 0,5) as a group by a.name order by a.sort_id ASC , a.add_time DESC");
$this->rows = spClass('article_list')->spPager($this->spArgs('page', 1), 6)->findSql("select a.* from (select id,name,brief,add_time,img,sort_id from chengshi.sp_article where is_open = 1 AND pid = $pid union select id,name,brief,add_time,img,sort_id from wenbo.sp_article where is_open = 1 AND pid = $pid) as a group by a.name order by a.sort_id ASC , a.add_time DESC");
45.
46.
$this->pager = spClass('article_list')->spPager()->getPager();
47.
$this->row = $row;
48.
//if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'){
- D:\wwwroot\ouke1\SpeedPHP\spFunctions.php on line 21
16.
if(!is_object($handle_controller) || !method_exists($handle_controller, $__action)){
17.
eval($GLOBALS['G_SP']["dispatcher_error"]);
18.
exit;
19.
}
20.
// 路由并执行用户代码
21.
22.
$handle_controller->$__action();
// 控制器程序运行完毕,进行模板的自动输出
23.
if(FALSE != $GLOBALS['G_SP']['view']['auto_display']){
24.
$__tplname = $__controller.$GLOBALS['G_SP']['view']['auto_display_sep'].
25.
$__action.$GLOBALS['G_SP']['view']['auto_display_suffix']; // 拼装模板路径
26.
$handle_controller->auto_display($__tplname);
- D:\wwwroot\ouke1\index.php on line 39
34.
require(SP_PATH."/SpeedPHP.php");
35.
36.
// 这里是入口文件全局位置
37.
import(APP_PATH.'/include/index/tpl_func.php');
38.
39.
40.
spRun(); // SpeedPHP 3新特性
41.
function isMobile() {
42.
$user_agent = $_SERVER['HTTP_USER_AGENT'];
43.
$mobile_agents = Array("240x320", "acer", "acoon",
44.
"acs-", "abacho", "ahong", "airness", "alcatel",