Pseudo PostreSQL ADODB README
Description:
Pseudo PostgreSQL ADODB is a PHP class designed as a drop-in replacement for ADOdb for PHP applications that do
not need the full power of ADOdb, want to remain light and fast but want to remain comptable with ADOdb.
The API of PostgreSQL ADODB Emulation was designed to be comptable with ADOdb. I was able to remove ADOdb from my
application framework and use this class instead, I noticed a 20% performance increase and the framework is smaller
because this class is just one file instead of many (of course your performance may vary from mine).
This script is distributed primarily for people with existing experience with ADOdb, if you need help you may contact
me though.
Example:
Following is an example of using PostgreSQL ADOdb Emulation, you may also reference the ADOdb documentation online at
http://php.weblogs.com/ADODB
// include pg-adodb class
include_once('pg-adodb-class.php');
// create instance of the class
$db = new PG_ADODB();
// connect to the database
$db->Connect('database-hostname', 'username', 'password', 'database');
// execute a SQL query
$users_result = &$db->Execute("SELECT firstname,lastname FROM users ORDER BY lastname,firstname ASC");
// list each user
while ($users_row = $users_result->FetchRow()) {
print $users_row['firstname'] . ' ' . $users_row['lastname'] . '<br>';
}
// free result set
$users_result->Close();
// free memory
unset($users_row, $users_result);
Author:
Jason Sheets
10/5/02
License:
This class is distributed under the BSD License.
Copyright (C) 2002 Jason Sheets <jsheets@shadonet.com>.
All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the project nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE. |