on PHP and MySQL

Wow. So I’m a little embarassed even writing this, but until recently I hadn’t really worked with MySQL. Sure, I’m using WordPress for this blog, and I’ve used Joomla! and Drupal, but I’ve never rolled up my sleaves and worked on programming PHP to create MySQL tables and retrieving data. Wow. What I have been missing.

I do a lot of researching and testing different programming languages and internet technoligies, because I love learning new things and I love figuring out the most appropriate and efficient way of doing things. In the past, I’ve leaned towards using XML as a non-sensitive data holder. What drew me to XML for this purpose was that it was always easy to teach clients how to update and add data to an XML file, and all they needed was a text editor. I had balked at the idea of using MySQL because I assumed it was difficult to learn and use and XML was working just fine for me.

A client of mine has a website where they post a calendar of upcoming events. The events on the calendar also show up on other pages throughout their website. In the past, any time an event was added or the date of an event had passed, I would go into the calendar page and whatever other pages the event was listed on and edit all instances of the event. I’ve wanted to change this since day one (I &heart; efficiency, remember?), but I’ve always had a lot of other things on my plate for this client, so i put it off. Oh, how silly of me.

The calendar issue finally came to the front burner for me, and I decided it was time for me to buckle down and learn MySQL. To my surprise it took maybe half an hour to learn the basics of inserting and retrieving data from MySQL using PHP! And with the help of phpMyAdmin, managing the data on the client side can be just as easy as using XML. I’ll post more later with specifics, but this is just a reminder to myself in the future and to anyone else putting off learning efficient and appropriate methods for anything:

STOP. TAKE THE TIME TO SAVE YOURSELF TIME.

June 26, 2009 • Posted in: php

Leave a Reply