5 jQuery Plugins for Manipulating Table Data

CSVtoTable

If you’ve ever been given a nasty looking CSV file to turn into an easily readable table, you know what a pain it can be… even if you automate much of the process. This jQuery plugin takes all that pain away.

Data Tables

This plugin does everything — filtering, sorting, pagination, editing, column manipulation — with client side or server side processing. The beautiful thing is, if you just want some simple filtering and sorting, it is really, really easy to set up, and the result is gorgeous with almost no effort.

Tabledit

I started playing with this when I was developing an admin area for a directory site. This can give a plain old HTML table superpowers, or at least spreadsheet-like abilities.

Wholly

Wholly doesn’t filter, sort or page. What it does do, and do well, is highlight table rows and columns in response to mouse movements. If you’ve got complex tables your visitors need to sift through, this makes them beautiful and far more functional than simply shading every even or odd row.

Table2Excel

Back in the day, if I wanted an ‘export to Excel’ function on my tables, I’d have to code it. With this plugin, I can better spend that time doing important stuff like watching cat videos.

Forwarding Important Email to Your Phone As A Text Message Using Gmail

forward email to your phone

I learned something new yesterday. I was waiting for an important email to arrive, but also had a great deal of other work to do.

Generally, what happens if I am waiting for email, is that I open and check Gmail every ten minutes or so. Most of the time there’s something interesting there to see or read, and before I know it, I’ve blown away a good hunk of work time.

So, as I waited for this email, I thought, “Wouldn’t it be great if I could ignore my email and just have that particular message sent to my phone as a text message?”

It turns out that I could do just that.

The first thing you need to do to accomplish this is to find out your phone’s email address. Yes, it has one. Generally, it’s your ten digit phone number @ your carrier domain, but the fastest and most foolproof way to find out the address is to start a new text message on your phone, and put your email address where the recipient phone number or contact name usually goes. This will send an email from your phone, and it will reveal your phone’s email address when you receive it.

Once you’ve got the correct email address, you can set that address up as a forwarding email in Google. Click the Gear icon on the top right hand side of Gmail, choose Settings, then pick the Forwarding and POP/IMAP.

Right at the top of that screen is the place to choose a forwarding address. You might get squeamish at this point, thinking you’re forwarding all your mail to your phone, which would be a mess, but as long as the “Disable Forwarding” checkbox is ticked, you’re safe. Add your phone’s email address and confirm.

Once it’s added (and forwarding is still disabled!) use the link at the bottom of the forwarding tools to create a filter. Choose to filter either by sender email, or by a word in the subject line, or both to make sure you only get the important email sent to your phone, then click, “Create Filter With This Search.”

The next screen will let you choose what to do with matching messages. Choose the “Forward to” checkbox, and choose your SMS email from the drop down select box beside it.

Click the submit button to create the filter, and you’re done! You can stop checking your mail constantly, because you’ll be instantly alerted on your phone when the urgent message appears.

Upgrading PHP Code from MYSQL to MYSQLi

PHP-MySQL

I have been coding in PHP for many years. So many I’ve lost count. So I have written more than a few mysql_connect and mysql_query commands in more web pages than I can shake a stick at. I never spent much time thinking about it till I heard that the MYSQL was being deprecated in PHP 5 in favour of the MYSQLi extension that was to take its place.

Yesterday I took some time to build a new feature on an old website, and used MYSQLi in earnest for the first time. It was a pretty good experience over all. MYSQLi feels familiar and friendly, even if it changes the order of some arguments, and it is far more OOP-friendly than the old extension.

MYSQLi stands for MYSQL improved, and in many ways it is improved. I haven’t had the need for transactional statements, but many have, and now the functionality is there. There are other things I can easily do with MYSQLi that took handstands and backflips to do with the old MYSQL extension. I’m particularly happy with the ability to have multiple statements via mysqli_multi_query().

This weekend, I plan on finishing my new features, then travelling back in time to convert my old publishing site code to be compatible with MYSQLi. It probably won’t be fun. The site was built in chunks, on the fly, and usually without much of a plan, over the course of thirteen years. It’s a bit of a logistical mess. I’m starting with the newest sections, and a fresh database, and will work it a bit at a time. It’s probably a good time to upgrade all of the code, not just the databases, and make the site a little more cohesive and the code much more object oriented.