 |
static |
void |
setLogger(MFLogger $logger) |
|
|
|
Sets the logger of the database system |
 |
static |
MFLogger |
getLogger() |
|
|
|
Returns the logger used by the database system |
 |
static |
MFDB |
newInstance(string $dsn, string $user, string $password[, array $options]) |
|
|
|
Create a new database connection with the setup given.
- $dsn
The database identification string. See Connection-Strings for details.
- $user
The database user name, if needed/used
- $password
The password for $user (if needed)
- $options
Optional addidional options
|
 |
|
void |
close() |
|
|
|
Closes the connection to the database. |
 |
|
void |
setDatabase(string $name) |
|
|
|
On systems with multiple databases, set the active database to the one given. |
 |
|
string |
getDatabase() |
|
|
|
Returns the type of the database given. |
 |
|
MFDBResult |
query(string $query[, $limit[, $skip]]) |
|
|
|
|
 |
|
mixed[] |
mulitquery(string[] $query) |
|
|
|
|
 |
|
MFDBStatement |
createStatement(string $query[, $limit[, $skip]]) |
|
|
|
|
 |
|
MFDBView |
createViewInstance(string $name, string $query) |
|
|
|
|
 |
|
object |
getObject(string $sql[,string $class[, array $param]]) |
|
|
|
|
 |
|
mixed[] |
getArray(string $sql) |
|
|
|
|
 |
|
mixed[] |
getRow(string $sql) |
|
|
|
|
 |
|
object[] |
getObjectList(string $sql[,string $class[, array $param]]) |
|
|
|
|
 |
|
array[] |
getArrayList($sql) |
|
|
|
|
 |
|
array[] |
getRowList($sql) |
|
|
|
|
 |
|
long |
getInsertId() |
|
|
|
|
 |
|
long |
getAffectedRowCount() |
|
|
|
|
 |
|
string |
condition2sql(MFDBCondition $con) |
|
|
|
|
 |
|
MFDBTable |
table(string $name[, boolean $addPrefix]) |
|
|
|
Creates a table object represeting the table $name. |
 |
|
string[] |
tableList([boolean $removePrefix]) |
|
|
|
|
 |
|
void |
createTable(MFDBTableInfo $info[, boolean $addPrefix]) |
|
|
|
|
 |
|
void |
dropTable(string $table[, boolean $addPrefix]) |
|
|
|
|
 |
|
long |
dateCol2uts($date) |
|
|
|
|
 |
|
string |
uts2dateCol(long $uts) |
|
|
|
|
 |
|
long |
datetimeCol2uts($datetime) |
|
|
|
|
 |
|
string |
uts2datetimeCol(long $uts) |
|
|
|
|
 |
|
string |
escapeString(string $text) |
|
|
|
|
 |
|
string |
escapeTableName(string $name[, boolean $addPrefix]) |
|
|
|
|
 |
|
string |
escapeColumnName(string $name) |
|
|
|
|
 |
|
string |
escapeValue(mixed $value) |
|
|
|
|
 |
|
void |
setPrefix(string $prefix) |
|
|
|
Sets the database table prefix. |
 |
|
string |
getPrefix() |
|
|
|
Returns the database table prefix. |
 |
|
string[] |
getColumns() |
|
|
|
Returns a array with the names of all avaible columns. |
 |
|
MFDBColumnInfo |
getColumnInfo(mixed $column) |
|
|
|
Fetches a column info object which represents the column given by name or index. |
 |
|
void |
getColumnCount() |
|
|
|
Returns the number of columns avaible. |
 |
|
long |
getRowNumber() |
|
|
|
Returns the number of the current row.. |
 |
|
long |
getRowCount() |
|
|
|
Returns the number of avaible rows. |
 |
|
mixed[] |
fetchRow() |
|
|
|
Fetches the next row as a numbered array. |
 |
|
mixed[] |
fetchArray() |
|
|
|
Fetches the next row as a assocative array. |
 |
|
object |
fetchObject() |
|
|
|
Fetches the next row as an object. |
 |
|
array[] |
fetchRowList() |
|
|
|
Fetches the all rows as a list of numbered arrays. |
 |
|
array[] |
fetchArrayList() |
|
|
|
Fetches the all rows as a list of assocative arrays. |
 |
|
object[] |
fetchObjectList() |
|
|
|
Fetches the all rows as a list of objects |
 |
|
array[] |
close() |
|
|
|
Closes the result set and freeing all resources. |