PHP homepage error Resource ID #六

Source: Internet
Author: User
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 ...
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.