Resourceid #6

Source: Internet
Author: User
Tags php website
The home page of the php website reports an Error Resourceid #6. the test page reports an Error: Error & nbsp; page: & nbsp; index. phpError & nbsp; infos: & nbsp; No & nbsp; database & nbsp; selected & nbsp; Error & nbsp; SQL: & nbsp; select & nbsp; * & nbsp; from & nbsp; c_seo & php website 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 where the problem is. Can someone help me?
$ This-> The queryString value is select * from c_seo where id = 1
$ This-> the value of linkID is 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:


------ Solution --------------------
No database selected
Check ......

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.