8

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?

Tim Post
  • 33,371
  • 15
  • 110
  • 174
Shikha
  • 109
  • 6

3 Answers3

17

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.

This may help

Sougata Bose
  • 31,517
  • 8
  • 49
  • 87
7

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

Hytool
  • 1,358
  • 1
  • 7
  • 22
  • 4
    Although PDO is the right thing to do, this doesn't answer the question and should be written as a comment instead. – Calimo Jul 02 '15 at 08:58
  • 2
    @Calimo, Agreed ! Actually, The reason to write this thing in ANSWER section was, I wasn't able to comment before posting this answer ! – Hytool Jul 02 '15 at 11:14
0

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

Community
  • 1
  • 1
Suraj Palwe
  • 2,080
  • 3
  • 26
  • 42