ADOdb
ADOdb is a nice and popular data abstraction layer developed by John Lim and
released under LGPL. This is one of the very best data abstraction layers for PHP.
You can get the latest version of ADOdb from http://adodb.sourceforge.net.
Installing ADOdb
There is no install of ADodb as such. It is a set of classes and regular scripts. So all
you have to do is just extract the archive in a location from where you can include
the script. Let's take a look at the following image to understand the directory
structure after extracting:
Chapter 7
[ 183 ]
Connecting to Different Databases
Like PDO, you can connect to different database drivers using ADOdb. DSN is
different from PDO. Let's take a look at the supported database list and their DSN
strings.
ADOdb supports a common DSN format, like this:
$driver://$username:$password@hostname/$database?options[=value]
So what are the available drivers supported by ADOdb? Let's take a look below. This
is a list taken from the ADOdb manual for your understanding:
Name Tested Database Prerequisites Operating
Systems
access B Microsoft Access/Jet. You need to create
an ODBC DSN.
ODBC Windows
only
ado B Generic ADO, not tuned for specific
databases.
Pages:
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198