MySQL or MySQLi

Mihai B.

Well-known member
Registered
Joined
Apr 19, 2016
Messages
243
Points
18
In my config file of my website cms, it decaled this variable

Code:
$config['Database']['dbtype'] = 'mysqli';
and on old version

Code:
$config['Database']['dbtype'] = 'mysql';
Which should I use? why?

Can you tell me what is the difference between mysqli and mysql? which one is right for you?


thanks
Mihai
 

HostBastic

Well-known member
Hosting Provider
Registered
Joined
Nov 17, 2016
Messages
320
Points
28
MySQLi or MySQL Improved and somtimes refered as MySQL improved extension is a relational database driver that is used with PHP. MySQLi is a replacement for the mysql functions, with object-oriented and procedural versions, it supports prepared statements.
Which one is right for you, that depends on what you are trying to achive, however both will be able to use MySQL from PHP.
 

JohnnyK

Member
Registered
Joined
Mar 15, 2017
Messages
59
Points
0
MySQL is the old database and Improved driver. MySQLi takes advantage of the newer features of MySQL 5.
MySQLi is the OOP version of MySQL extension. In the end, MySQLi and MySQL accomplish the same thing: they are extensions for interacting with MySQL from PHP.
 

iserveradmin11

Member
Registered
Joined
Mar 17, 2017
Messages
60
Points
8
Hello,
As far I know MySQLi Extension (or simply known as MySQL Improved or MySQLi) is a relational database driver that is used mainly in the PHP programming language. It provides an interface to the already founded MySQL databases. It is quite literally an improved version of its predecessor, MySQL, which was simply a means to manage databases over servers.
 

overcast

Well-known member
Registered
Joined
Jun 27, 2017
Messages
88
Points
0
You should migrate to Mysqli as soon as possible. If you choose to use old verison then in future you may have to update code for the php 7. In php 7 onwards you don't have much backward compatibility support. So use MySQLi and PDO.
 

24x7serverman

Well-known member
Hosting Provider
Registered
Joined
Jul 25, 2017
Messages
651
Points
28
MySQLi is improved version of MySQL. It offers more security and supports various features like prepared statement, both procedural and object-oriented interface. It has debugging feature too. Extension directories for MSQL is /etc/mysql and for MySQLi is /etc/mysqli.
 
Latest Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top