Is this website shows error!
Below is I found the code according to the prompt, don't know what went wrong, ask god to help, thank you very much!
$is_insert=true;
$this - & gt; Register_error ($STR);
$this - & gt; Show_errors? Trigger_error ($STR, E_USER_WARNING) : null;
return false;
}
CodePudding user response:
Print out the SQL see there must be some grammar mistakesCodePudding user response:
<? PHP/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* the Author: Justin Vincent ([email protected])
* Web... : http://twitter.com/justinvincent
* Name.. : ezSQL_mysql
* Desc... : mySQL component (or ezSQL up front databse abstraction library)
*
*/
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* ezSQL up front error strings - mySQL
*/
$ezsql_mysql_str=array
(
1=& gt; 'the Require $dbuser and $dbpassword to connect to a database server',
2=& gt; 'the Error establishing a mySQL database connection. The Correct user/password? The Correct hostname? The Database server running? '
3=& gt; 'the Require $dbname to select a database,
4=& gt; 'mySQL database connection is not active,
5=& gt; 'Unexpected error while trying to select the database'
);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* ezSQL up front Database specific class - mySQL
*/
if ( ! Function_exists' mysql_connect ()) die (' & lt; B> Fatal Error: & lt;/b> EzSQL_mysql requires mySQL Lib to be compiled and the or linked in to the PHP engine ');
if ( ! Class_exists (' ezSQLcore) die (' & lt; B> Fatal Error: & lt;/b> EzSQL_mysql requires ezSQLcore (ez_sql_core. PHP) to be included/the loaded before it can be 2 ');
The class ezSQL_mysql extends ezSQLcore
{
Var $dbuser=false;
Var $dbpassword=false;
Var $dbname=false;
Var $dbhost=false;
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Constructor - allow the user to perform a qucik connect at the
* same time as initialising the ezSQL_mysql class
*/
Function ezSQL_mysql ($dbuser='$dbpassword=', $dbname=', $dbhost='localhost')
{
$this - & gt; Dbuser=$dbuser;
$this - & gt; Dbpassword=$dbpassword;
$this - & gt; Dbname=$dbname;
$this - & gt; Dbhost=$dbhost;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Short hand way to connect to the mySQL database server
* and select a mySQL database at the same time
*/
Function quick_connect ($dbuser='$dbpassword=', $dbname=', $dbhost='localhost')
{
$return_val=false;
if ( ! $this - & gt; The connect ($dbuser, $dbpassword, $dbhost, true));
Else if (! $this - & gt; Select ($dbname));
The else $return_val=true;
Return $return_val;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Try to connect to the mySQL database server
*/
Function connect ($dbuser='$dbpassword=', $dbhost='localhost')
{
Global $ezsql_mysql_str; $return_val=false;
//Must have a user and a password
if ( ! $dbuser)
{
$this - & gt; Register_error ($ezsql_mysql_str [1]. J. 'in' __FILE__. 'on the line. The __LINE__);
$this - & gt; Show_errors? Trigger_error ($ezsql_mysql_str [1], E_USER_WARNING) : null;
}
//Try to establish the server database handle
Else if (! $this - & gt; DBH=@ mysql_connect ($dbhost, $dbuser, $dbpassword, true, 131074))
{
$this - & gt; Register_error ($ezsql_mysql_str [2]. J. 'in' __FILE__. 'on the line. The __LINE__);
$this - & gt; Show_errors? Trigger_error ($ezsql_mysql_str [2], E_USER_WARNING) : null;
}
The else
{
$this - & gt; Dbuser=$dbuser;
$this - & gt; Dbpassword=$dbpassword;
$this - & gt; Dbhost=$dbhost;
$return_val=true;
}
Return $return_val;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Try to select a mySQL database
*/
Function select ($dbname=' ')
{
Global $ezsql_mysql_str; $return_val=false;
//Must have a database name
if ( ! $dbname)
{
$this - & gt; Register_error ($ezsql_mysql_str [3]. J. 'in' __FILE__. 'on the line. The __LINE__);
$this - & gt; Show_errors? Trigger_error ($ezsql_mysql_str [3], E_USER_WARNING) : null;
}
//Must have an active database connection
Else if (! $this - & gt; DBH)
{
$this - & gt; Register_error ($ezsql_mysql_str [4]. J. 'in' __FILE__. 'on the line. The __LINE__);
$this - & gt; Show_errors? Trigger_error ($ezsql_mysql_str [4], E_USER_WARNING) : null;
}
//Try to connect to the database
Else if (! @ the mysql_select_db ($dbname, $this - & gt; nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull