PHP MySQL Database Layer Class 1.03 review

Download
by rbytes.net on

PHP MySQL Database Layer Class is a php class providing some very useful methods to work with a mySQL database. Here are some key

License: Free for non-commercial use
File size: 67K
Developer: Stefan Gabos
0 stars award from rbytes.net

PHP MySQL Database Layer Class is a php class providing some very useful methods to work with a mySQL database.

Here are some key features of "PHP MySQL Database Layer Class":
connects you to a mySQL host and select a database in a single call (opposed to PHP's native functions which requires two steps)
has a "query" method that has the same role as PHP's mysql_query but this one will tell you about the affected rows (through the "affectedRows" property) when executing an INSERT, UPDATE, DELETE query and about the found rows (through the "foundRows" property) when executing a SELECT query - the "foundRows" property tells you how many records would the query return if there was no LIMIT applied to it - very useful when creating listing so you don't have to do a query to determine how many records you have in a database and the again a query to show only the records from a page
has an "escape_string" method that will "mysql_real_escape_string" your string weather the magic_quotes are on or not
has a "dlookup" method that i am sure you will find VERY useful once you get to know it: it return data from a single table cell based on standard mySQL WHERE criteria - see the manual for detailed info! (yes, it acts exactly like the function with the same name from microsft access)
provides you with a very useful debug interface which shows you each query your script is running, for how long, the total number of queries made, the total execution time of your queries, errors of your queries and what are the values of $_GET, $_POST, $_COOKIES and $_SERVER superglobal variables. The debug interface is template driven and supports localisation.
it will notify you if a specific query is executed more than once and will advise you to optimize the script
you can instruct it to send you an email if a query runs longer then a specified time
the code is heavily documented so you can easily understand every aspect of it and even maybe use it as a php tutorial

What's New in This Release:
the state of $_FILES and $_SESSION superglobals are now also shown in the debug window
better integration with XTemplate (previously, there was a variable assigned to each entry in the language file now the XTemplate's feature to handle arrays is used)
properties will now have default values in PHP 4

PHP MySQL Database Layer Class 1.03 keywords