Questions tagged [mdb2]

A database abstraction layer for PHP.

At the time of this writing, the last stable version was released on 2007-05-03 and the last beta version on 2012-10-29.

A better alternative is –the native since PHP 5.1.0– PDO

PEAR MDB2 is a merge of the PEAR DB and Metabase php database abstraction layers.

It provides a common API for all support RDBMS.

Among other things MDB2 features:

  • An OO-style query API
  • A DSN (data source name) or array format for specifying database servers
  • Datatype abstraction and on demand datatype conversion
  • Portable error codes
  • Sequential and non sequential row fetching as well as bulk fetching
  • Ability to make buffered and unbuffered queries
  • Ordered array and associative array for the fetched rows
  • Prepare/execute (bind) emulation
  • Sequence emulation
  • Replace emulation
  • Limited Subselect emulation
  • Row limit support
  • Transactions support
  • Large Object support
  • Index/Unique support
  • Module Framework to load advanced functionality on demand
  • Table information interface
  • RDBMS management methods (creating, dropping, altering)
  • Full integration into the PEAR Framework
  • PHPDoc API documentation

Currently supported RDBMS:

  • MySQL
  • MySQLi (PHP5 only)
  • PostgreSQL
  • Oracle
  • Frontbase (unmaintained)
  • Querysim
  • Interbase/Firebird (PHP5 only)
  • MSSQL
  • SQLite
93 questions
0
votes
1 answer

How to include PEAR packages by only including the PEAR.php file?

I'm using PEAR on a hosted website and I want to use the MDB2 package. Every site on the web initializes the MDB2 package with an require('MDB2.php'). Sadly, my web host only provides to me the location of the main PEAR.php file. But I think I…
Steven Roose
  • 2,731
  • 4
  • 29
  • 46
-1
votes
1 answer

Pear Log MDB2 message length and errors

I recently set up a SQL logging framework with PEAR, and everything was working fine. However, I thought that the default length of the message field (VARCHAR 200) was a little short, so I changed my database structure in phpmyadmin to increase…
-3
votes
1 answer

Inherited code uses Pear's MDB2 - Safe to keep?

I've just been given a huge PHP website that uses Pear's MDB2 for all its MySQL commands (but apparently doesn't use Pear for anything else -- at least not that I can see). The hundreds of webpages I've been given are littered with code like…
Chuck Le Butt
  • 47,570
  • 62
  • 203
  • 289
1 2 3 4 5 6
7