The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> MySQL vs MySQLi
Christian J
post Jul 3 2010, 03:39 PM
Post #1


.
********

Group: WDG Moderators
Posts: 9,653
Joined: 10-August 06
Member No.: 7



Is there any point in learning MySQL today, or should you go straight to MySQLi?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
Brian Chandler
post Jul 4 2010, 01:24 PM
Post #2


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



Yes, it's just a new php interface to Mysql; I only skimmed, but it's a class, so gives you the advantages of OOP (object-oriented programming). But it isn't going to make any real difference to the mysql queries, and it's not likely that the conventional functions will simply disappear. If they did, there would be so many people who have large applications using those functions that someone would obviously write wrapper functions to get them back through the class interface.

And the functions all correspond anyway, so it really isn't a question of "learning" new function. (Surely you don't memorise these function details anyway? You just copy the last one, and check tricky bits in the manual.)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 4 2010, 05:28 PM
Post #3


.
********

Group: WDG Moderators
Posts: 9,653
Joined: 10-August 06
Member No.: 7



QUOTE(Brian Chandler @ Jul 4 2010, 08:24 PM) *

it's not likely that the conventional functions will simply disappear.

As long as the new ones don't lack some feature of the old ones. I don't think you can mix MySQL and MySQLi functions with the same MySQLi connection (or can you?).

Can you use the old functions at all when MySQLi is enabled in php.ini? I guess I should test that myself, but in the meantime http://www.php.net/manual/en/mysqli.installation.php says

"With versions of PHP 5.3 and newer, you can alternatively use the new MySQL Native Driver with mysqli. This gives a number of benefits over using libmysql."

whatever that means (FWIW I don't have PHP5.3).

QUOTE
(Surely you don't memorise these function details anyway?

Some of it will always stick, so I'll probably minimize confusion by being consistent.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th April 2024 - 10:52 AM