Class db_engine

Description

Class DB Engine

Located in /include/classes/db_engine.class.php (line 16)


	
			
Method Summary
db_engine db_engine ( $mysql_host, [ $mysql_user = ], [ $mysql_pass = ], [ $mysql_db = ], [ $debug = "0"])
void db_connect ()
void err_handler (mysql_error $err)
mysql_result query (string $query)
void set_debug ( $debug)
void set_logger ( $logger)
void set_mysql_db ( $data)
void set_mysql_host ( $data)
void set_mysql_pass ( $data)
void set_mysql_user ( $data)
void update_table (string $table, array $data, array $id)
Methods
Constructor db_engine (line 74)

Constructor sets up {$mysql_host, $mysql_user, $mysql_pass, $mysql_db, $debug}

db_engine db_engine ( $mysql_host, [ $mysql_user = ], [ $mysql_pass = ], [ $mysql_db = ], [ $debug = "0"])
  • $mysql_host
  • $mysql_user
  • $mysql_pass
  • $mysql_db
  • $debug
db_connect (line 87)

Connects to the MySQL database and sets up the database handler.

void db_connect ()
err_handler (line 136)

Handles any errors that are generated by MySQL.

If $debug is set to true, then the error will be displayed.

void err_handler (mysql_error $err)
  • mysql_error $err: The MySQL Error object.
query (line 117)

Connects to the database, executes a query, returns the result if needed, and closes the connection.

mysql_result query (string $query)
  • string $query: The SQL query to execute.
set_debug (line 208)

Turns debuggin mode on or off

void set_debug ( $debug)
  • $debug
set_logger (line 180)

Sets the MySQL Host

void set_logger ( $logger)
  • $logger
set_mysql_db (line 201)

Sets the MySQL Database

void set_mysql_db ( $data)
  • $data
set_mysql_host (line 173)

Sets the MySQL Host

void set_mysql_host ( $data)
  • $data
set_mysql_pass (line 194)

Sets the MySQL Password

void set_mysql_pass ( $data)
  • $data
set_mysql_user (line 187)

Sets the MySQL Username

void set_mysql_user ( $data)
  • $data
update_table (line 150)

Updates the data of a row in a table.

void update_table (string $table, array $data, array $id)
  • string $table: The table name to update.
  • array $data: An array with the new values.
  • array $id: The index of the row to update.

Documentation generated on Thu, 14 Aug 2008 08:13:47 +0200 by phpDocumentor 1.4.1