Class dvt_db

Description

DVT Database class

Located in /classes/class.dvt_db.php (line 18)


	
			
Variable Summary
array $aLogMsg
object $db
array $dsn
object $oLogger
Method Summary
boolean __destruct ()
boolean checkExtension (string $extName)
boolean dbConnect ()
array dbQuery (string $sqlStr)
boolean logMsg (string $msg, [integer $type = 2])
boolean testResults (databaseresultobject $res)
boolean writeLog ()
Variables
array $aLogMsg = array() (line 21)

Array of log messages

object $db (line 39)

PEAR database instance

array $dsn = array() (line 35)

PEAR connection array.

Takes form of: "phptype" => "", "username" => "", ""password" => "", "hostspec" => "", "database" => ""

object $oLogger (line 25)

Logger object passed externally

Methods
Destructor __destruct (line 181)

Destructor

boolean __destruct ()
checkExtension (line 47)

Checks for existance of particular extension (usually the database name)

Returns boolean

boolean checkExtension (string $extName)
  • string $extName: The extension name to check
dbConnect (line 66)

Connect to database

boolean dbConnect ()
dbQuery (line 95)

Run SQL query

Returns query result

array dbQuery (string $sqlStr)
  • string $sqlStr: The SQL string to run against database
logMsg (line 142)

Writes log msg to class var aLogMsg;

Returns boolean

boolean logMsg (string $msg, [integer $type = 2])
  • string $msg: The message you want to add to the log
  • integer $type: indicates which log you wish to append to 1= userlog, 2= adminlog
testResults (line 122)

Cheks whether query returned any rows

Returns boolean $res is query result set

boolean testResults (databaseresultobject $res)
  • databaseresultobject $res: checks whether a database result has any row data
writeLog (line 155)

Writes all log msgs to class var oLogger if exists;

Returns boolean

boolean writeLog ()

Documentation generated on Tue, 21 Sep 2004 13:46:02 +0100 by phpDocumentor 1.3.0RC3