Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #15697 > unrolled thread

Which API for mysql

Started byDerek Turner <frderek@suremail.je>
First post2015-10-13 12:16 +0000
Last post2015-10-13 16:46 +0200
Articles 4 — 3 participants

Back to article view | Back to comp.lang.php


Contents

  Which API for mysql Derek Turner <frderek@suremail.je> - 2015-10-13 12:16 +0000
    Re: Which API for mysql Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-13 08:49 -0400
      Re: Which API for mysql Derek Turner <frderek@suremail.je> - 2015-10-13 13:06 +0000
        Re: Which API for mysql Gregor Kofler <usenet@gregorkofler.com> - 2015-10-13 16:46 +0200

#15697 — Which API for mysql

FromDerek Turner <frderek@suremail.je>
Date2015-10-13 12:16 +0000
SubjectWhich API for mysql
Message-ID<d84b0sFiu1gU1@mid.individual.net>
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?

[toc] | [next] | [standalone]


#15698

FromJerry Stuckle <jstucklex@attglobal.net>
Date2015-10-13 08:49 -0400
Message-ID<mviugv$vb8$1@dont-email.me>
In reply to#15697
On 10/13/2015 8:16 AM, Derek Turner wrote:
> 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?
> 

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
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#15699

FromDerek Turner <frderek@suremail.je>
Date2015-10-13 13:06 +0000
Message-ID<d84dueFjmt4U1@mid.individual.net>
In reply to#15698
On Tue, 13 Oct 2015 08:49:32 -0400, Jerry Stuckle wrote:


> 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.

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

[toc] | [prev] | [next] | [standalone]


#15700

FromGregor Kofler <usenet@gregorkofler.com>
Date2015-10-13 16:46 +0200
Message-ID<mvj5bu$rrh$1@dont-email.me>
In reply to#15699
Am 2015-10-13 um 15:06 schrieb Derek Turner:
> On Tue, 13 Oct 2015 08:49:32 -0400, Jerry Stuckle wrote:
>
>
>> 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.
>
> Most helpful and informative as ever, Jerry, TYVM. mysqli seems to be a
> shallower learning curve :)

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.)

Gregor

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web