您好,欢迎访问一九零五行业门户网

php网站首页报错 Resource id #六

php网站首页报错 resource id #6
测试页面报错:
error page: /index.php
error infos: no database selected 
error sql: select * from c_seo where id=1
不知道问题出来哪里,有人帮我看下吗
$this->querystring 的值是select * from c_seo where id=1
$this->linkid 的值是resource id #6
execute($id,$sql);
}
function execute($id=me, $sql='')
{
global $db;
if($db->isclose)
{
$this->open(false);
$db->isclose = false;
}
if(!empty($sql))
{
$this->setquery($sql);
}
//sql语句安全检查
if($this->safecheck)
{
checksql($this->querystring);
}
$this->result[$id] = mysql_query($this->querystring,$this->linkid);
if($this->result[$id]===false)
{
$this->displayerror(mysql_error().
error sql: .$this->querystring.);
}
}
function displayerror($msg)
{
$errortrackfile = dirname(__file__).'/../data/mysql_error_trace.inc';
if( file_exists(dirname(__file__).'/../data/mysql_error_trace.php') )
{
@unlink(dirname(__file__).'/../data/mysql_error_trace.php');
}
$emsg = '';
$emsg .= error warning!\r\n;
$emsg .= \r\n;
$emsg .=
error page: .$this->getcururl().
\r\n;
$emsg .= error infos: {$msg}
\r\n;
$emsg .=
\r\n;
echo $emsg;
}
?>
?resource?id?#6 分享到:
------解决方案--------------------
 no database selected 
检查下……
其它类似信息

推荐信息