University of Southern California

Public Member Functions

SQLDb Class Reference

Inheritance diagram for SQLDb:
Model

List of all members.

Public Member Functions

 SQLDb ($conf=NULL)
 lastInsertRowId ()
 numRows ()
 escapeString ($s)
 open ($name="")
 execute ($sql)
 getRow ()
 close ()

Detailed Description

SQLDb - wrapper class for database interactions.

Definition at line 44 of file SQLDb.php.


Member Function Documentation

SQLDb::escapeString ( s )

escapeString - return an escape string.

Parameters:
stringto escape.
Returns:
escaped string

Definition at line 87 of file SQLDb.php.

SQLDb::execute ( sql )

execute - run a set of SQL commands

Parameters:
$sql- SQL statement(s)
Returns:
true if no errors, false otherwise

Definition at line 152 of file SQLDb.php.

References Model::error(), and Model::errorCount().

SQLDb::getRow (  )

getRow - get a table row based on previous executed query

Returns:
associative array of row if successful, false otherwise

Definition at line 207 of file SQLDb.php.

References Model::error(), and Model::errorCount().

SQLDb::lastInsertRowId (  )

lastInsertRowId - return the last inserted row id.

Returns:
id number if successful, false otherwise

Definition at line 64 of file SQLDb.php.

SQLDb::numRows (  )

numRows - return the number of rows in a result set.

Returns:
row count successful, false otherwise

Definition at line 78 of file SQLDb.php.

SQLDb::open ( name = "" )

open - Open a SQLite Database connection

Parameters:
name- optional, if provide set the db name and open it.
Returns:
true if no errors, false otherwise.

Definition at line 106 of file SQLDb.php.

References Model::error(), and Model::errorCount().

Referenced by SQLDb().

SQLDb::SQLDb ( conf = NULL )
Parameters:
$conf- a configuring Model

Definition at line 48 of file SQLDb.php.

References Model::Model(), and open().


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