PHP Tutorial: Using ADODB to port your MySQL code | Linux Today

PHP Tutorial: Using ADODB to port your MySQL code

Written By
Web Webster
Web Webster
Dec 17, 2000

“PHP is all about creating dynamic web-sites with the least fuss
and the most fun. To create these websites we need to use databases
to retrieve login information, to splash dynamic news onto the web
page and store forum postings. So let’s say we were using the
popular MySQL database for this. Your company has done such a
fantastic job that the Web site is more popular than your wildest
dreams. You find that MySQL cannot scale to handle the workload;
time to switch databases.”

“Unfortunately in PHP every database is accessed slightly
differently. To connect to MySQL, you would use mysql_connect();
when you decide to upgrade to Oracle or Microsoft SQL Server, you
would use ocilogon() or mssql_connect() respectively. What is worse
is that the parameters you use for the different connect functions
are different also.. One database says po-tato, the other database
says pota-to. Oh-oh.”

A database wrapper library such as ADODB comes in handy
when you need to ensure portability. It provides you with a common
API to communicate with any supported database so you don’t have to
call things off.

Complete
Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.