Get number of affected rows in previous operation
int
affectedRows
()
Connect the database server and select a database on it
resource
connect
(string $server, string $username, string $password, string $database, [bool $persistency = false])
-
string
$server: Database hostname.
-
string
$username: Database connection username.
-
string
$password: Database connection password.
-
string
$database: Database name.
-
bool
$persistency: Create a persistant connection?
Close database connection
bool
disconnect
()
Escape unescaped string to use in SQL statement
string
escape
(string $str)
-
string
$str: Unescaped string.
Get result data
mixed
fetchResult
(int $row, mixed $field)
-
int
$row: Row index.
-
mixed
$field: Field name or index.
Fetch a result row
mixed
fetchRow
([int $fetchType = DBW_FETCH_ASSOC])
-
int
$fetchType: DBW_FETCH_ASSOC - fetch an associative array, DBW_FETCH_ORDERED - fetch an enumerated array, DBW_FETCH_OBJECT - fetch object.
Fetch a set of result rows
mixed
fetchRows
([int $fetchType = DBW_FETCH_ASSOC])
-
int
$fetchType: DBW_FETCH_ASSOC - fetch rows as associative arrays, DBW_FETCH_ORDERED - fetch rows as enumerated arrays, DBW_FETCH_OBJECT - fetch rows as objects
Get the name of the specified field in a result
string
fieldName
(string $index)
-
string
$index: Field_index starts at 0.
Get the type of the specified field in a result
string
fieldType
(string $index)
-
string
$index: Field_index starts at 0.
Free result memory
bool
freeResult
()
Returns the text and code of the error message from previous operation
array
getError
()
Get the ID generated from the previous INSERT operation
int
insertID
()
Get number of fields in result
int
numFields
()
Get number of rows in result
int
numRows
()
Execute SQL statement
bool
query
(string $sql)
-
string
$sql: SQL statement.
Move internal result pointer
bool
seekRow
(int $row)
-
int
$row: Row_number starts at 0.