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

Class: DbConnection

Source Location: /core/DbConnection.php

Class Overview


Database Connection abstraction


Variables

Methods



Class Details

[line 16]
Database Connection abstraction

Provides extremely useful functions for data retrieval, and other database affairs.




[ Top ]


Class Variables

static $_instances = array()

[line 18]



Tags:

access:  protected

Type:   mixed


[ Top ]

$db_connection =  null

[line 20]



Tags:

access:  protected

Type:   mixed


[ Top ]

$db_host =  ''

[line 21]



Tags:

access:  protected

Type:   mixed


[ Top ]

$db_name =  ''

[line 24]



Tags:

access:  protected

Type:   mixed


[ Top ]

$db_password =  ''

[line 23]



Tags:

access:  protected

Type:   mixed


[ Top ]

$db_user =  ''

[line 22]



Tags:

access:  protected

Type:   mixed


[ Top ]

$errors = array()

[line 25]



Tags:

access:  protected

Type:   mixed


[ Top ]

$last_error =  ''

[line 27]



Tags:

access:  protected

Type:   mixed


[ Top ]

$last_query =  ''

[line 26]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


static method getInstance [line 50]

static DbConnection getInstance( [ $connection = 'default'], string $db_host, string $db_user, string $db_password, string $db_name)

Gets an instance of the the DbConnection



Tags:

todo:  Change to Use config from files.
access:  public


Parameters:

string   $db_host  
string   $db_user  
string   $db_password  
string   $db_name  
   $connection  

[ Top ]

constructor __construct [line 32]

DbConnection __construct( $db_host, $db_user, $db_password, $db_name)



Tags:

access:  protected


Parameters:

   $db_host  
   $db_user  
   $db_password  
   $db_name  

[ Top ]

method connect [line 65]

void connect( )



Tags:

access:  public


[ Top ]

method executeQuery [line 167]

void executeQuery( $sql)



Tags:

access:  public


Parameters:

   $sql  

[ Top ]

method getAllRows [line 77]

void getAllRows( $sql)



Tags:

access:  public


Parameters:

   $sql  

[ Top ]

method getArrayPair [line 108]

void getArrayPair( $sql)



Tags:

access:  public


Parameters:

   $sql  

[ Top ]

method getErrors [line 178]

void getErrors( )



Tags:

access:  public


[ Top ]

method getErrorsString [line 183]

void getErrorsString( )



Tags:

access:  public


[ Top ]

method getIndexedRows [line 123]

void getIndexedRows( $sql)



Tags:

access:  public


Parameters:

   $sql  

[ Top ]

method getLastError [line 201]

void getLastError( )



Tags:

access:  public


[ Top ]

method getLastId [line 191]

void getLastId( )



Tags:

access:  public


[ Top ]

method getLastQuery [line 196]

void getLastQuery( )



Tags:

access:  public


[ Top ]

method getMysqlConnection [line 206]

void getMysqlConnection( )



Tags:

access:  public


[ Top ]

method getOneColumn [line 93]

void getOneColumn( $sql)



Tags:

access:  public


Parameters:

   $sql  

[ Top ]

method getOneRow [line 143]

void getOneRow( $sql)



Tags:

access:  public


Parameters:

   $sql  

[ Top ]

method getOneValue [line 155]

void getOneValue( $sql)



Tags:

access:  public


Parameters:

   $sql  

[ Top ]


Documentation generated on Mon, 05 Sep 2011 20:33:02 -0500 by phpDocumentor 1.4.3