AbstractDB Driver Constructor
Initilises an instance of the AbstractDB Driver base class.
AbstractDB_Driver
AbstractDB_Driver
(array $arguments)
-
array
$arguments: A list of connection and driver specific arguments. See AbstractDB for details concerning connection arguments.
Gets the Number of Affected Rows
Gets the number of rows affected by the last query.
int
AffectedRows
()
Redefined in descendants as:
Clears the latest error message.
void
ClearError
()
Closes the Database Connection
bool
Close
()
Redefined in descendants as:
Opens a Database Connection
Attempts to connect to the database using the parameters given in the constructor.
bool
Connect
()
Redefined in descendants as:
Move a Result Pointer to the Specified Row
bool
DataSeek
(resource &$rs, int $row_num)
-
resource
$rs: A reference to a result handle returned by executing a query.
-
int
$row_num: The 0 based index of the row that the result pointer should move to.
Redefined in descendants as:
Fetches a Result Row as an Associative Array
array
FetchAssoc
(resource &$rs)
-
resource
&$rs: A reference to a resource handle returned by executing a query.
Redefined in descendants as:
Fetches the First Field Value
Fetches the value from the first field of a result row.
mixed
FetchField
(resource &$rs)
-
resource
&$rs: A reference to a resource handle returned by executing a query.
Redefined in descendants as:
Fetches a Result Row as an Object
object Returns
FetchObject
(resource &$rs)
-
resource
&$rs: A reference to a resource handle returned by executing a query.
Redefined in descendants as:
Fetches a Result Row
array
FetchRow
(resource &$rs)
-
resource
&$rs: A reference to a resource handle returned by executing a query.
Redefined in descendants as:
Gets the Number of Fields
Gets the number of fields returned by given result handle.
int
FieldCount
(resource &$rs)
-
resource
$rs: A reference to a resource handle returned by executing a query.
Redefined in descendants as:
Gets the Field Names of a Query
bool
FieldNames
(resource &$rs, array &$fields)
-
resource
$rs: A reference to a resource handle returned by executing a query.
-
array
$fields: A reference to an array that will contain the field names.
Redefined in descendants as:
Frees a Result Resource
Frees the resources associated with the given result handle.
bool
FreeResult
(resource &$rs)
-
resource
&$rs: A reference to a resource handle returned by executing a query.
Redefined in descendants as:
Gets the Last Error.
string
GetLastError
()
Gets the Last Inserted AUTO_INCREMENT ID
Gets the ID of the last AUTO_INCREMENT record inserted into the databse.
mixed
InsertID
()
Redefined in descendants as:
Executes an SQL Statement.
Executes an SQL statement passed in as a parameter.
resource
Query
(string $sql)
-
string
$sql: The SQL statement to execute on the database.
Redefined in descendants as:
Executes an SQL Replace Query
resource
Replace
(string $table, array $fields)
-
string
$table: The name of the table to execute the replace query on.
-
array
$fields:
An associative array of field definitions. Keys should be the field names and values should be an associative array containing the following keys:
Key => bool indicating that this field is the primary key or part of a unique index. Key values must not be NULL.
Type => either "text", "numeric", "bool".
Value => the value of the field.
Null => bool indicating if the value of the field should be set to NULL.
e.g. $fields = array("Field1" => array("Key" => true, "Type" => "numeric", "Value" => 123, "Null" => false));
Redefined in descendants as:
Gets the Number of Rows
Gets the number of rows returned by given result handle.
int
RowCount
(resource &$rs)
-
resource
$rs: A reference to a resource handle returned by executing a query.
Redefined in descendants as:
Sets the Current Active Database
mixed
SetDatabase
(string $dbName)
-
string
$dbName: The name of the database to set active.
Redefined in descendants as:
Sets the Error Message
void
SetError
(string $scope, string $message)
-
string
$scope: The scope of the error, generally the function in which it occured.
-
string
$message: The actual error message.