PHP Database Interface 1.0 RC4 review
Download
|
|
PHP Database Interface is an easy to use PHP database interface meant to give applications universal support across many databases, including several flat file formats.
Installation
These are just a few notes installation notes regarding DBi and using it with your project
txtSQL support requires the following files from the release archive (currently 3.0 Beta is Supported) :
txtSQL.class.php, txtSQL.parser.php & txtSQL.core.php To be placed in the 3rdparty/txtsql/ directory or the location of your choice
fileSQL support requires the the following file from the release archive (currently 1.0 RC4 is Supported) :
fileSQL.php To be placed in the 3rdparty/fql/ directory of the location of your choice
Test data and a demo script is available in the demo/ directory
Simple Example
// The filesystem root path to DBi needs to be defined before the include
define('PHP_DBI_ROOT', 'C:/program files/apache group/apache2/htdocs2/modules/dbi/');
define('PHP_DBI_FQL', PHP_DBI_ROOT.'3rdparty/fql/fileSQL.php'); //Required for FQL Support
define('PHP_DBI_TXTSQL', PHP_DBI_ROOT.'3rdparty/txtsql/'); //Required for txtSQL Support
include_once("../dbi.php");
$interface = dbi::factoryControllerConstruction(); //create a new dbi object
// open a connection to the database (this will example will work with any
// of the interfaced databases
$interface->open_connection_now_persistent("fql&".PHP_DBI_ROOT."3rdparty/fql/data&demo");
//Select the entire contents of 'test2' table and store the first row
$inteface->ExecuteQueryAndReturnRow?(array('select' => '*', 'from' => 'test2'));
$results = $interface->fetchRowThenGetAnotherrow();
//Display the first row of results
print "First Row: ";
print_r($results);
print "< br >";
$interface->disconnect_fromDatabase(); // Closes connection to the database
What's New in This Release:
The tableInfo function was added to return the schema.
LIMIT was added to select functions for supporting databases.
LIMIT emulation is available to all database types.
Support for the Firebird database was added.
PHP Database Interface 1.0 RC4 keywords