Phang  2.1
 All Classes Files Functions Variables Pages
Public Member Functions | Protected Attributes
Mysql_Adapter Class Reference

Mysql DB adapter. More...

Inheritance diagram for Mysql_Adapter:
Base Db_Adapter

List of all members.

Public Member Functions

 __construct ($server, $database, $user, $password)
 Class constructor.
 connect ()
 connect to the database
 select ()
 Select the database.
 close ()
 Close the connection.
 escape ($item)
 Escape the string to make it safe.
 prepare ($sql)
 Prepare a SQL statement.
 is_table ($table_name, $database='')
 Check the table exists.
 parse_parameters ($sql, $data=array())
 Creates raw SQL string with parameters escaped.
 execute ($sql, $data=null, $options=array())
 Execute a statement, with provided variables.
 record ($sql, $data=array(), $options=array())
 Fetch the first row of a query.
 records ($sql, $data=array(), $options=array())
 Fetch all rows of a query as an associative array.
 value ($sql, $data=array(), $options=array())
 Fetch the first value of the first column from a query.
 values ($sql, $data=array(), $options=array())
 Fetch the first column values for each row from a query as an array.
 errors ($sql='')
 Return errors from last PDO statement.
 get_last_id ()
 Return last inserted id.
- Public Member Functions inherited from Base
 __call ($function, $params)
 The 'magic' call method will get/set for us invoked when the interpreter can not find a method the user is asking for.
 set_parameters ($arguments)
 Set variables from an array to member fields requires $this->optional_arguments or $this->required_arguments to have been set by the subclass.

Protected Attributes

 $connection = ''
 DB connection.
 $server = ''
 Database server.
 $database = ''
 Database.
 $user = ''
 User name.
 $password = ''
 Password.
- Protected Attributes inherited from Base
 $optional_arguments = array()
 Array of options that can be set to variables.
 $required_arguments = array()
 Array of options that need to be set to variables.

Detailed Description

Mysql DB adapter.

Creates a connection to the database using basic mysql library function, and executes statements


Constructor & Destructor Documentation

Mysql_Adapter::__construct (   $server,
  $database,
  $user,
  $password 
)

Class constructor.

Connects to database and sets the database handle.


The documentation for this class was generated from the following file: