Fetching Data from Multiple Tables using Joins

Normalization is almost universally applied to relational databases such as MySQL in order to optimize tables for general-purpose querying and to rid them of certain undesirable characteristics that could lead to a loss of data integrity. Doing so tends to promote better accuracy of queries, but it also leads to queries that take a little [...]

Database Transaction Auditing Using Triggers

Logging database transactions is relatively easy within PostgeSQL and MySQL. Options can be set within the configuration files (postgresql.conf for PostgreSQL and my.ini for MySQL) to enable and record database INSERTs, UPDATEs and DELETEs. But if a client requires to view this information on a regular basis for auditing purposes, without the need for a [...]

MySQL database abstraction class in PHP

Introduction A MySQL database abstraction class, which makes database handling easier and object-oriented. The class: [code lang="php"] class DBI { var $server; var $user; var $pass; var $db; var $link; var $result = null; /* ** The constrcutor, terminates the script if the connection fails ** @params: ** string $server - the server IP or [...]