iDatabase Interface Reference

Inheritance diagram for iDatabase:

mysql pgsql

List of all members.

Public Member Functions

 connectDB ($sHost, $sPort, $sDBName, $sUser, $sPassword)
 connectDBAdmin ()
 connectDBUser ($sUser, $sPassword)
 closeDB ()
 executeTransaction ($pQueryArray)
 executeSQL ($sQuery)
 getNextRecord ()
 hasMoreFields ()
 getNextField ()
 getNextFieldDescription ()
 getAffectedRows ()
 getNumberRows ()
 getNumberFields ()
 getLastError ()
 getLastErrorNo ()
 escapeString ($sString)


Detailed Description

Defines methodes which must be supported by a implemented database system.

Author:
Stephan Schuetz, stephan.schuetz(at)fhnw.ch
Date:
14.10.2007
Version:
1.0
(c) Copyright GITTA 2007. Creative Commons License "Attribution-Noncommercial-Share Alike" http://creativecommons.org/licenses/by-nc-sa/3.0/

Member Function Documentation

iDatabase::connectDB ( sHost,
sPort,
sDBName,
sUser,
sPassword 
)

Connect to database.

Parameters:
$sHost 
$sPort 
$sDBName 
$sUser 
$sPassword 
Returns:
True on success, otherwise false.

Implemented in mysql, and pgsql.

iDatabase::connectDBAdmin (  ) 

Connect administrator to database.

Returns:
True on success, otherwise false.

Implemented in mysql, and pgsql.

iDatabase::connectDBUser ( sUser,
sPassword 
)

Connect user to database.

Parameters:
$sUser 
$sPassword 
Returns:
True on success, otherwise false.

Implemented in mysql, and pgsql.

iDatabase::closeDB (  ) 

Close database connection.

Returns:
True on success, otherwise false.

Implemented in mysql, and pgsql.

iDatabase::executeTransaction ( pQueryArray  ) 

Executes a transaction (array with SQL statements).

Parameters:
$pQueryArray 
Returns:
True on success, otherwise false.

Implemented in mysql, and pgsql.

iDatabase::executeSQL ( sQuery  ) 

Executes a single query.

Parameters:
$sQuery 
Returns:
True on success, otherwise false.

Implemented in mysql, and pgsql.

iDatabase::getNextRecord (  ) 

Get next record, free result set if no more recors are available.

Returns:
True if there are more records, otherwise false.

Implemented in mysql, and pgsql.

iDatabase::hasMoreFields (  ) 

Check if there are more fields in the result set.

Returns:
True if there are more fields, otherwise false.

Implemented in mysql, and pgsql.

iDatabase::getNextField (  ) 

Get next field data.

Returns:
Data.

Implemented in mysql, and pgsql.

iDatabase::getNextFieldDescription (  ) 

Get next field description.

Returns:
Array with the field name and with the lenght of the field in the database or, if this is not available the length of the name.

Implemented in mysql, and pgsql.

iDatabase::getAffectedRows (  ) 

Get number of affected rows by insert, update a.s.o.

Returns:
Number of affected rows.

Implemented in mysql, and pgsql.

iDatabase::getNumberRows (  ) 

Get number of rows in result set.

Returns:
Number of rows.

Implemented in mysql, and pgsql.

iDatabase::getNumberFields (  ) 

Get number of fields in result set.

Returns:
Number of fields.

Implemented in mysql, and pgsql.

iDatabase::getLastError (  ) 

Get last database error.

Returns:
Database error as string.

Implemented in mysql, and pgsql.

iDatabase::getLastErrorNo (  ) 

Get last database error number.

Returns:
Database error number.

Implemented in mysql, and pgsql.

iDatabase::escapeString ( sString  ) 

Escapes string for security reasons.

Parameters:
$sString String to escape.
Returns:
Escaped string.

Implemented in mysql, and pgsql.


The documentation for this interface was generated from the following file:
Generated on Sun Dec 2 19:47:28 2007 for elSQL - e-learn SQL by  doxygen 1.5.3