DboMysql Class Reference

Inheritance diagram for DboMysql:

DboMysqlBase DboSource DataSource Object List of all members.

Public Member Functions

 _execute ($sql)
 column ($real)
 connect ()
 describe (&$model)
 disconnect ()
 fetchResult ()
 getEncoding ()
 lastAffected ()
 lastError ()
 lastInsertId ($source=null)
 lastNumRows ()
 listSources ()
 resultSet (&$results)
 value ($data, $column=null, $safe=false)

Public Attributes

 $_baseConfig
 $description = "MySQL DBO Driver"

Detailed Description

Definition at line 342 of file dbo_mysql.php.


Member Function Documentation

DboMysql::_execute ( sql  ) 

Executes given SQL statement.

Parameters:
string $sql SQL statement
Returns:
resource Result resource identifier protected

Definition at line 410 of file dbo_mysql.php.

DboMysql::column ( real  ) 

Converts database-layer column types to basic types

Parameters:
string $real Real database-layer column type (i.e. "varchar(255)")
Returns:
string Abstract column type (i.e. "string")

Reimplemented from DataSource.

Definition at line 570 of file dbo_mysql.php.

References DboSource::length(), DboSource::limit(), and DboSource::name().

DboMysql::connect (  ) 

Connects to the database using options in the given configuration array.

Returns:
boolean True if the database could be connected, else false

Definition at line 368 of file dbo_mysql.php.

References DataSource::$config, config(), and DboMysqlBase::setEncoding().

DboMysql::describe ( &$  model  ) 

Returns an array of the fields in given table name.

Parameters:
string $tableName Name of database table to inspect
Returns:
array Fields in table. Keys are name and type

Definition at line 443 of file dbo_mysql.php.

References DataSource::__cacheDescription(), DataSource::column(), DboSource::fullTableName(), DboMysqlBase::index(), DboSource::length(), and DboSource::query().

DboMysql::disconnect (  ) 

Disconnects from database.

Returns:
boolean True if the database could be disconnected, else false

Definition at line 396 of file dbo_mysql.php.

DboMysql::fetchResult (  ) 

Fetches the next row from the current result set

Returns:
unknown

Definition at line 642 of file dbo_mysql.php.

References DboSource::$index.

DboMysql::getEncoding (  ) 

Gets the database encoding

Returns:
string The database encoding

Definition at line 661 of file dbo_mysql.php.

DboMysql::lastAffected (  ) 

Returns number of affected rows in previous database operation. If no previous operation exists, this returns false.

Returns:
integer Number of affected rows

Definition at line 532 of file dbo_mysql.php.

DboMysql::lastError (  ) 

Returns a formatted error message from previous database operation.

Returns:
string Error message with error number

Definition at line 520 of file dbo_mysql.php.

DboMysql::lastInsertId ( source = null  ) 

Returns the ID generated from the previous INSERT operation.

Parameters:
unknown_type $source
Returns:
in

Reimplemented from DataSource.

Definition at line 556 of file dbo_mysql.php.

References $id, and DboSource::fetchRow().

DboMysql::lastNumRows (  ) 

Returns number of rows in previous resultset. If no previous resultset exists, this returns false.

Returns:
integer Number of rows in resultset

Definition at line 544 of file dbo_mysql.php.

References DboSource::hasResult().

DboMysql::listSources (  ) 

Returns an array of sources (tables) in the database.

Returns:
array Array of tablenames in the database

Definition at line 418 of file dbo_mysql.php.

References config(), and DboSource::name().

DboMysql::resultSet ( &$  results  ) 

Enter description here...

Parameters:
unknown_type $results

Definition at line 616 of file dbo_mysql.php.

References DboSource::$index, and DboSource::name().

DboMysql::value ( data,
column = null,
safe = false 
)

Returns a quoted and escaped string of $data for use in an SQL statement.

Parameters:
string $data String to be prepared for use in an SQL statement
string $column The column into which this data will be inserted
boolean $safe Whether or not numeric data should be handled automagically if no column data is provided
Returns:
string Quoted and escaped data

Reimplemented from DboSource.

Definition at line 479 of file dbo_mysql.php.

References DboSource::boolean(), and DboSource::introspectType().


Member Data Documentation

DboMysql::$_baseConfig

Initial value:

 array(
        'persistent' => true,
        'host' => 'localhost',
        'login' => 'root',
        'password' => '',
        'database' => 'cake',
        'port' => '3306',
        'connect' => 'mysql_pconnect'
    )

Reimplemented from DataSource.

Definition at line 354 of file dbo_mysql.php.

DboMysql::$description = "MySQL DBO Driver"

Reimplemented from DboMysqlBase.

Definition at line 348 of file dbo_mysql.php.


The documentation for this class was generated from the following file:
Generated on Sun Nov 22 00:30:55 2009 for CakePHP 1.2.x.x (v1.2.4.8284) by doxygen 1.4.7