PHP homepage error Resource ID #6
Test Page Error:
Error page:/index.php
Error Infos:no Database selected
Error Sql:select * from C_seo where id=1
I don't know what the problem is, can someone help me to see it?
The value of the $this->querystring is the select * from C_seo where id=1
The value of the $this->linkid is the resource ID #6
function Query ($id = "Me", $sql = ')
{
$this->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 statement Security check
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
Share to:
------Solution--------------------
No Database selected
Check the next ...