I've used both PDO as well as mysqli. My preference is mysqli over PDO.
Mysqli is almost identical to the mysql in syntax, in terms of how you call
the functions, but it is a bit different in other areas. The PHP docs
should point you in the right direction.
Not to beat a dead horse, but it's been my experience, that once you set up
OOP, it's easier to maintain. No more digging through db calls within the
application, as everything's kept nice and neat in a few dedicated class
Just my 2 cents.....
On Wed, Apr 29, 2015 at 10:01 AM, Ken Irwin <[log in to unmask]> wrote:
> Hello all,
> I've just learned that the PHP mysql_* functions are all deprecated as of
> PHP 5.5, and I'm trying to figure out what this means for my life. My
> library's website is heavily database-driven, hand-coded, and all written
> using the mysql_* functions. It's currently running PHP 5.4, so presumably
> code all needs to be updated before the next server upgrade.
> So I'm looking for a little advice:
> 1. Is there a general consensus on what the best long-term
> alternative to the mysql_* functions is? I see a bunch of references to the
> PDO extension, which is available on our server. Is that The Answer, or
> should I be looking other places as well.
> 2. Does anyone have advice about how to proceed with an enormous
> overhaul like this? I'm sure I'll be working on a development copy of the
> server until everything is all worked out. But beyond that, advice would be
> welcome. Have you employed students to do work like this?
> 3. I wonder what other broad-sweeping old-fashionednesses may also
> be about to rear up and bite me. If you imagine that I learned procedural
> (almost never object-oriented) PHP 4 in about 2000 and am slow to change my
> ways, can you predict what sort of deprecated foolishness I might still be
> Any advice, input, or experience would be appreciated!