MySQL vs. MySQLi

23 views
Skip to first unread message

Andy Thurston

unread,
Jan 26, 2014, 9:59:43 AM1/26/14
to nashvi...@googlegroups.com
Hi guys,
 Looking for some advice here.

 The majority of my PHP knowledge comes from the textbook by Nixon (O'Reilly): "PHP, MySQL, and js" published 2009.

 Needless to say it's outdated, and I'm starting to realize it for one big reason: the MySQLi driver extension seems to be much more powerful and versatile than MySQL, which I've been learning to use.

 1) Is this the norm now, does anyone utilize the base MySQL driver nowadays? If so, for what reasons?

 2) Can anyone suggest good reading/course material that will get me deep into MySQLi development with PHP?

 3) Do I sound completely naive? 

Thanks everybody!
 Andy

Ben Ramsey

unread,
Jan 26, 2014, 3:22:49 PM1/26/14
to nashvi...@googlegroups.com, nashvi...@googlegroups.com
Andy,

You don't sound naive at all!

I would recommend taking a look at PDO, rather than MySQL or MySQLi. It's what most in the community use these days, and it'll suit your needs in most cases. Feel free to ask questions about it on this list.


Cheers,
Ben




--
You received this message because you are subscribed to the Google Groups "Nashville PHP User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nashvillephp...@googlegroups.com.
To post to this group, send email to nashvi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nashvillephp/dd81438d-1a07-47f2-813f-3d3e1fb75b86%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Michael Babker

unread,
Jan 26, 2014, 2:28:09 PM1/26/14
to nashvi...@googlegroups.com
Hi Andy,

The original MySQL extension is deprecated in PHP 5.5 (http://www.php.net/manual/en/changelog.mysql.php), so I'd recommend the MySQLi extension ahead of the original.  http://php.net/manual/en/mysqli.overview.php I think does a good job explaining things at a higher level.

As far as books go, I personally haven't looked at any; I've always learned best looking at existing code.  If this helps you, I'd suggest looking at frameworks out there with database support.

Hope this helps some!


On Sun, Jan 26, 2014 at 8:59 AM, Andy Thurston <athur...@gmail.com> wrote:

--

Hari K T

unread,
Jan 26, 2014, 9:47:33 PM1/26/14
to nashvi...@googlegroups.com
If you feel PDO seems a bit harder when you deal with IN array.

Try out https://github.com/auraphp/Aura.Sql/#array-quoting which is an extended PDO ( dev-develop-2 version 2 which is 5.3 support now in beta-2 ).

or something like doctrine/dbal

http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/data-retrieval-and-manipulation.html#list-of-parameters-conversion

Thanks

Hari K T

You can ring me : +91 9388 75 8821

Skype  : kthari85
Twitter : harikt


Andy Thurston

unread,
Jan 26, 2014, 10:04:03 PM1/26/14
to nashvi...@googlegroups.com
Thanks guys! I will take a look at you suggestions next weekend!

Appreciate the help.

Andy

oxyclean

unread,
Jan 27, 2014, 6:36:04 PM1/27/14
to nashvi...@googlegroups.com
PostgreSQL anyone?  I like it better than MySQL, and it has a PDO driver too.
Reply all
Reply to author
Forward
0 new messages