PhpMyObject
[ class tree: PhpMyObject ] [ index: PhpMyObject ] [ all elements ]

Class: PMO_Dbms_Mysql

Source Location: /fichiers/v0.15/PMO_core/PMO_Dbms_Mysql.php

Class Overview

PMO_MyDbms
   |
   --PMO_Dbms_Mysql

This class implements the MySql driver.


Variables

Methods


Inherited Variables

Inherited Methods

Class: PMO_MyDbms

PMO_MyDbms::delete()
deletes the data row corresponding to the PMO_Object from the database table All primary key must be fill.
PMO_MyDbms::factory()
returns a reference to the PMO_Dbms object If it does not already exists a new object is created and retained for future use
PMO_MyDbms::getDb()
Returns the DB link or DB object
PMO_MyDbms::getLog()
retrieves thee query verbose log
PMO_MyDbms::insert()
inserts new data into the database table corresponding to the PMO_Object all primary keys must be fill.
PMO_MyDbms::killInstance()
kills the current PMO_Dbms object
PMO_MyDbms::load()
Load a data row from the database and fills the PMO_Object with it
PMO_MyDbms::setDb()
Set the DB link or DB object
PMO_MyDbms::setLog()
sets the query verbose log
PMO_MyDbms::translateType()
converts the attribute types from database to PHP primary types: string, float, or int
PMO_MyDbms::update()
updates the database table corresponding to the PMO_Object All primary keys must be fill.

Class Details

[line 43]
This class implements the MySql driver.



[ Top ]


Class Variables

$result =

[line 49]

a result resource returned by a MySql query



Tags:

access:  protected

Type:   resource


[ Top ]



Class Methods


constructor __construct [line 58]

PMO_Dbms_Mysql __construct( [resource $mysqllink = NULL])

the constructor

if a mysql link is provided, it will be used.




Tags:

access:  public


Parameters:

resource   $mysqllink   a standrd MySql link returned by mysql_query()

[ Top ]

destructor __destruct [line 84]

void __destruct( )

closes the database connetion



Tags:

access:  public


[ Top ]

method beginTransaction [line 149]

void beginTransaction( )

starts a MySql transaction



Tags:

todo:  need to check if we already are in an open transaction and throw an exception if so
access:  public


[ Top ]

method commit [line 169]

void commit( )

commits a transaction



Tags:

todo:  need to check if we are in a transaction and throw an exception if we are not
access:  public


[ Top ]

method connect [line 72]

void connect( $authdb)

establishes a connection with the database server and the database



Tags:

see:  PMO_MyConfig
throws:  Exception if we cannot connect to the database server or the actual database
access:  public


Parameters:

array   $authdb   the database connection information, e.g. host, user name and password, database name

[ Top ]

method fetchArray [line 108]

array fetchArray( )

returns the next row as an associative array



Tags:

access:  public


[ Top ]

method getLastId [line 139]

int getLastId( )

returns the last inserted id



Tags:

access:  public


[ Top ]

method getTableDesc [line 118]

array getTableDesc( string $table)

returns an array containing the table properties



Tags:

access:  public


Parameters:

string   $table   the table name to look for

[ Top ]

method query [line 95]

bool query( string $query)

execute a SQL query against the database



Tags:

return:  TRUE is the query returned some results
throws:  Exception if no result were returned by the query
access:  public


Parameters:

string   $query   the SQL query to execute against the database

[ Top ]

method rollback [line 159]

void rollback( )

rolls back a transaction



Tags:

todo:  need to check if we are in a transaction and throw an exception if we are not
access:  public


[ Top ]


Documentation generated on Wed, 15 Oct 2008 09:15:41 -0400 by phpDocumentor 1.4.1