James John – Software Engineer

MySQL2MySQLi: A Small Program to Help Migrate from PHP mysql_* to mysqli_*

Stumbled upon a very monstrous PHP project, very old of course, the client complained that the web host refused to downgrade the server for them and this project doesn’t work anymore because it was written with bunch of mysql_* depreciated function.

Now it was my job to start editing these files one after the other, which I will definitely give up to. I got one tool online but it just scattered some variables around which I don’t like. On that same day, I decided to take up the challenge and write a program to do this migration for me. I started and it went successfully!

I had to put it up online. It might help someone out there too. The program might not work perfectly like 100% but I tried my best to make it useful.

Program is built on Python with Regular Expressions. Just glad it helped me.

Get it on GitHub

James John

Software Engineer