Which API for mysql

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
It would appear that the mysql API that I used happily a couple of years  
ago has now been deprecated in php 5.5

Of the other two which is the better way to go PDO or mysqli? and why?

Re: Which API for mysql

On 10/13/2015 8:16 AM, Derek Turner wrote:
Quoted text here. Click to load it

PDO is good if you may use a different database such as PostgreSQL in
the future.  You'll need fewer changes to the code.

Personally, I prefer mysqli if the code won't be used with any other
database.  But some people will tell you use PDO all of the time.  It's
all a matter of personal preference.

Remove the "x" from my email address
Jerry Stuckle

Re: Which API for mysql

On Tue, 13 Oct 2015 08:49:32 -0400, Jerry Stuckle wrote:

Quoted text here. Click to load it

Most helpful and informative as ever, Jerry, TYVM. mysqli seems to be a  
shallower learning curve :)

Re: Which API for mysql

Am 2015-10-13 um 15:06 schrieb Derek Turner:
Quoted text here. Click to load it

Not really. After having used mysqli for years, I switched to PDO:  
parameter binding is far more user friendly and I appreciate the  
different fetch options. (And - as stated - you have less work if your  
database backend changes since the API will remain the same.)


Site Timeline