Go to file
Daeus Tang da31a5240a Update formatting 2017-05-18 15:49:00 +01:00
MySQLiConvertor.php Update formatting 2017-05-18 15:49:00 +01:00
README.md Update README.md 2015-10-21 10:49:36 +01:00

README.md

MySQLi Convertor

A simple trick to convert old deprecated mysql code to mysqli in PHP

IMPORTANT: Noted that converting mysql to mysqli doesn't enhance your system security. It is recommended to rewrite your system in a modern and security approach.

The project currently doesn't include all of the function in mysql but you may extend it by adding corresponding functions easily.

SETUP

STEP 1. Include the convertor in your code

include 'SqliConvertor.php'; 

STEP 2. Set up the connection

$sqliConvertor = new SqliConvertor($host, $username, $password, $db_name);

STEP 3. Replace all the string "mysql_" to "$sqliConvertor->" in your file. If you are using Vim, you may use the following command

:%s/mysql_/$sqliConvertor->/g