Database Wrapper - A PHP Script that makes database interactions simpler.
A PHP Script that makes database interactions simpler.
This script currently supports the following Database Server Types:
Basic descriptions of the available functions:
- Retrieves an integer count from the database based on a Sql "Count" statement.
- Creates a new database given a valid Server, Server Port, Username and Password.
- Creates a new database given a valid Server, Server Port, Username, Password and Existing Database.
- Upon success, the new database is set as the target database for the Database Wrapper instance and 'True' is returned. If creation of the new database fails, error messages are displayed and 'False' is returned.
- Upon creation of a new record, this function retrieves the value of an Auto Increment (MySql) / Serial (PostgreSQL) field of the new record. Used in conjunction with an "INSERT INTO" Sql statement.
- Retrieves a single dimensional, key-value pair array from the database.
- Retrieves a multi-dimensional, key-value pair array from the database.
- Pings the Database Server Connection and returns True upon a valid connection and False upon failure.
- Runs a Sql Query and returns True upon success and False if the query fails.
- Verifies the new database using the current Server, Server_Port, Username and Password. Upon successful verification, the new database is set to the target database and 'True' is returned. Upon failure of verification, an error message is displayed and 'False' is returned.