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 ......