Data Access interface. More...
Public Member Functions | |
open ($server, $dbname, $username, $password, $options=NULL) | |
close () | |
escape ($text) | |
query ($sql, &$result) | |
exec ($sql) | |
fetch ($result) | |
insertID () | |
queryCount ($result) | |
execCount () |
Data Access interface.
close | ( | ) |
Close the connection (if opened)
Implemented in utyDbMySql, and utyDbSqlite.
escape | ( | $ | text | ) |
Implemented in utyDbMySql, and utyDbSqlite.
exec | ( | $ | sql | ) |
Exec the sql statement (INSERT,UPDATE,DELETE, etc) to the connected database.
sql | (string) the sql statement |
NOTABENE: use escape for data values
Implemented in utyDbMySql, and utyDbSqlite.
execCount | ( | ) |
Implemented in utyDbMySql, and utyDbSqlite.
fetch | ( | $ | result | ) |
Fetches the result of a query.
Implemented in utyDbMySql, and utyDbSqlite.
insertID | ( | ) |
Implemented in utyDbMySql, and utyDbSqlite.
open | ( | $ | server, | |
$ | dbname, | |||
$ | username, | |||
$ | password, | |||
$ | options = NULL | |||
) |
Opens the connection to the database.
server | (string) hostname_or_ip:port of the server | |
dbname | (string) the database to select | |
username | (string) username | |
password | (string) password | |
[options] | (array) database specific options |
NOTABENE: implementors showuld use the @ silent operator to avoid unwanted sensitive data logging
Implemented in utyDbMySql, and utyDbSqlite.
query | ( | $ | sql, | |
&$ | result | |||
) |
Query the sql SELECT statement to the connected database.
sql | (string) the sql SELECT statement | |
$result | (resource) pointer to an empty resource (any declared variable). Will be set to the query output. |
NOTABENE: use escape for data values
Implemented in utyDbMySql, and utyDbSqlite.
queryCount | ( | $ | result | ) |
Implemented in utyDbMySql, and utyDbSqlite.
Copyright © 2010 Attilio Pavone - www.utillyty.eu