PHP Classes


Recommend this page to a friend!
  Classes of Bennett Stone  >  Simple PHP MySQLi  >  >  Download  
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Simple PHP MySQLi
Access MySQL database wrapper using MySQLi
Author: By
Last change: Added total_queries function to display running tally of queries performed by this class. Updated to subversion 2.0.1
Date: 3 years ago
Size: 953 bytes


Class file image Download

PHP class to access MySQL database wrapper using MySQLi

This class can:

- Connect to a given MySQL server
- Execute arbitrary SQL queries
- Retrieve the number of query result rows, result columns and last inserted table identifier
- Retrieve the query results in a single array
- Escape a single string or an array of literal text values to use in queries
- Determine if one value or an array of values contain common MySQL function calls
- Check of a table exists
- Check of a given table record exists
- Return a query result that has just one row
- Execute INSERT, UPDATE and DELETE queries from values that define tables, field names, field values and conditions
- Truncate a table
- Send email messages with MySQL access and query errors
- Display the total number of queries performed during all instances of the class

Full usage examples are provided in example.php, using example data provided in example-data.sql