Reputation: 109
I have mysql installed and now I want to work on mysqli with new database.
Does it affect my previous database which is in mysql if I enable mysqli in phpmyadmin?
Upvotes: 8
Views: 1038
Reputation: 2120
Before today I use to use mysql
but today I changed to mysqli
. Nothing happens if you use mysql
no need to create a new DataBase for this.
The suggestion I would give is to use mysqli
since it is
Improved version of mysql and provides better functionalities
This is one good SO post about difference between two
Other way is also to switch if you go to PDO
Upvotes: 0
Reputation: 1368
if you're switching from MySQL to MySQLi, I suggest you to go for PHP Data Objects (PDO) with Prepared Statements.
It could give you little bit of burden initially, but once you create your own PDO class, you will be so glad upon your PDO work, believe me.
I took help from below links when I started it. try'em.
http://php.net/manual/en/book.pdo.php
http://code.tutsplus.com/tutorials/php-database-access-are-you-doing-it-correctly--net-25338
Upvotes: 7
Reputation: 31749
mysqli -> MySQL Improved Extension.
The mysqli extension, or as it is sometimes known, the MySQL improved extension, was developed to take advantage of new features found in MySQL systems versions 4.1.3 and newer. The mysqli extension is included with PHP versions 5 and later.
You just have to change the code you have done using mysql
. No Need to change the database. mysqli
methods also use the mysql
database.
Upvotes: 17