Pluf_DB_MySQL Class Reference

List of all members.

Public Member Functions

 __construct ($user, $pwd, $server, $dbname, $pfx='', $debug=false)
 database ($dbname)
 getServerInfo ()
 debug ($query)
 close ()
 select ($query)
 execute ($query)
 getLastID ()
 getError ()
 esc ($str)
 qn ($col)
 begin ()
 commit ()
 rollback ()
 __toString ()

Public Attributes

 $con_id
 $pfx = ''
 $lastquery = ''
 $engine = 'MySQL'
 $type_cast = array()

Private Attributes

 $debug = false


Detailed Description

MySQL connection class

Constructor & Destructor Documentation

Pluf_DB_MySQL::__construct ( user,
pwd,
server,
dbname,
pfx = '',
debug = false 
)


Member Function Documentation

Pluf_DB_MySQL::database ( dbname  ) 

Pluf_DB_MySQL::getServerInfo (  ) 

Get the version of the MySQL server.

Returns:
string Version string

Pluf_DB_MySQL::debug ( query  ) 

Log the queries. Keep track of the last query and if in debug mode keep track of all the queries in $GLOBALS['_PX_debug_data']['sql_queries']

Parameters:
string Query to keep track
Returns:
bool true

Pluf_DB_MySQL::close (  ) 

Pluf_DB_MySQL::select ( query  ) 

Pluf_DB_MySQL::execute ( query  ) 

Pluf_DB_MySQL::getLastID (  ) 

Pluf_DB_MySQL::getError (  ) 

Returns a string ready to be used in the exception.

Returns:
string Error string

Pluf_DB_MySQL::esc ( str  ) 

Pluf_DB_MySQL::qn ( col  ) 

Quote the column name.

Parameters:
string Name of the column
Returns:
string Escaped name

Pluf_DB_MySQL::begin (  ) 

Start a transaction.

Pluf_DB_MySQL::commit (  ) 

Commit a transaction.

Pluf_DB_MySQL::rollback (  ) 

Rollback a transaction.

Pluf_DB_MySQL::__toString (  ) 


Member Data Documentation

Pluf_DB_MySQL::$con_id

Pluf_DB_MySQL::$pfx = ''

Pluf_DB_MySQL::$debug = false [private]

Pluf_DB_MySQL::$lastquery = ''

The last query, set with debug(). Used when an error is returned.

Pluf_DB_MySQL::$engine = 'MySQL'

Pluf_DB_MySQL::$type_cast = array()


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

Generated on Wed Feb 3 15:44:51 2010 for Pluf by  doxygen