Oh wow, I didn't know that, haha. Well now I do, thank you.
Another quick question. The plugins executes the queries every 5 seconds for a while, then seems to return another error: Invalid database handle: 0.
Now could that be because of a memory leak? If so, I don't see why this should be happening. A side note: this was hapenning before I changed the code to fix the column error. Could that have been the culprit?