MySql Data Access abstraction. 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 () | |
MySql Data Access abstraction.
| close | ( | ) |
Close the connection (if opened)
Implements utyDb.
| escape | ( | $ | text | ) |
Implements utyDb.
| 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
Implements utyDb.
| execCount | ( | ) |
Implements utyDb.
| fetch | ( | $ | result | ) |
Fetches the result of a query.
Implements utyDb.
| insertID | ( | ) |
Implements utyDb.
| 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) IGNORED, default=NULL |
NOTABENE: use the @ silent operator to avoid unwanted sensitive data logging
Implements utyDb.
| 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
Implements utyDb.
| queryCount | ( | $ | result | ) |
Implements utyDb.
Copyright © 2010 Attilio Pavone - www.utillyty.eu