Is there anything I have to do on the database end or is it just the php that changes? Can I just substitute mysqli functions for mysql functions? Anything else I should know?
Asked
Active
Viewed 4.5k times
3 Answers
41
I advise you to read through this. A lot of helpful information for what you want to do, plus a tool to help. See: Converting to MySQLi.
It's just the PHP that changes.
-
2Link broken. I believe this is the new link: https://wikis.oracle.com/display/mysql/Converting+to+MySQLi – Huseyin Yagli Sep 26 '12 at 11:13
-
3The link from that page to Oracle's tool is broken. There are a number of forks on GitHub, including this one: https://github.com/philip/MySQLConverterTool – Steve Almond Aug 22 '14 at 14:02
5
Everything I know about it says that the only changes you will have to make will be in the PHP. With that said be careful not all functions have the same name between the two so be careful changing from mysql_* to mysqli_*.
The site php.net will be your best friend.

Scott C Wilson
- 19,102
- 10
- 61
- 83

PseudoNinja
- 2,846
- 1
- 27
- 37
2
Also if you are migrating you should look into using PHP Data Objects (PDO) http://php.net/manual/en/book.pdo.php

markogrady
- 57
- 3