I once read a great article in the first or second issue of
http://www.phparch.com/ on database abstraction layers. At which point I
used the tutorial as a starting point for creating a very similar structure
I named dbWave. There are only minor differences and a postgresql driver is
now included for the most common pg_* functions.
I was just wondering if anyone has developed a database abstraction layer
that allows you to separate your SQL queries from your application logic
like dbWave does? I'm looking for a more advanced way of doing this?
Attached is dbWave for anyone to look at/use. To run it you need to use the
following tags in your file:
// DBWave include files
include( "[attached_filename].php" );
To instantiate the dbWave object you use the following code in a file name
connect.php
<?php
/* This file instantiates dbWave using our chosen API */
/* It is automatically generated by the database setup program */
// Instantiate dbWave using the MySQL API
$dbWave = new Mysql();
// Connect to the database
$dbWave->connect( 'yourhost', 'yourport', 'yourdbname', 'yourdbuser',
'yourdbpass' );
?>
Thanks,
Luke Woollard
Programmer / Analyst
TABORVISION.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php