MySQL to MySQLi

I started really working on web developer in 2007 or so. It started with a simple site which allowed users to post their confessions. As such, it required a database and the necessary PHP code to pull and post data to and from the data base. This project was my first real hands-on experience with PHP and MySQL. At the time, I wasn't aware of MySQLi which is essentially the new versions of the MySQL functions which PHP provides.

Trying to stay with the times, I've been reading and learning about how the MySQLi extensions and functins work. Fortunately it's all relatively easy and shouldn't be much harder to understand over the older MySQL functions.

This afternoon I finished porting our anime list site over to using MySQLi. Fortunately there's a couple really great resources which I utilized and made my work 💯x easier!

  • MySQLConverterTool
    This tool definitely made my life a lot easier. It allows you to upload PHP files or paste in PHP code and it will convert any MySQL functions into MySQLi functions. This was basically a life saver, I can't imagine how many hours it saved me. The only thing I had issues with was the database handler and how it handles converting for it. Relatively easy though, I mostly just did Find and Replace for those instances. It's a free tool and even better it's hosted on GitHub 😀

  • 'MySQLi' for Beginners - Codular
    Another very useful tool for learning how to change from MySQL to MySQLi. I utilized their database connection code since it was easy and simple to understand.

I must say, I think I see less code since I've switched. There seems to be a couple things I still need to wrap my head around, but overall, I like it. I'll be working on switching over 5-8 other projects in the near future. I am sure the above tools will really come in handy!


comments powered by Disqus

Morgan W.

Head over heels for gadgets!

Search



Instagram

Twitter