This class is a MySQL database access wrapper that uses some PHP 5 features to simplify the usual operations.
It establishes a connection with a MySQL server in the class constructor function and closes the connection in the destructor function.
It provides functions for executing SQL queries and return a the row object or multiple rows as an array of objects.
The query statements may be formatted with a variable number of arguments with the sprintf function.
Errors throw exceptions that may be catched by applications.
The class may also generate an error log in a file with formatted error lines that may take a variable number of format arguments. |