PHP – Simple PDO Class for Connecting to a MySQL Database

Here’s an extremely basic, reusable PHP and MySQL based PDO class for easily connecting to multiple database servers simultaneously within a script without having to go through a bunch of hoopla. Tidbits have been pieced together from the following sources with a little tweaking of my own (such as the ability to have default database values or to pass them as arguments):
http://simple_pdo_implementation.onlinephpfunctions.com/
http://culttt.com/2012/10/01/roll-your-own-pdo-php-class/
http://code.tutsplus.com/tutorials/why-you-should-be-using-phps-pdo-for-database-access–net-12059
Continue reading “PHP – Simple PDO Class for Connecting to a MySQL Database”

Exchange Server 2010 – Shrink Database Size – OR – Reclaim Lost Database Storage Space

As mentioned in a previous post, if you’re Email Server is running out of hard drive space and you’re in a world of hurt, there are several steps you must take to get that space back. Even if you have your user’s tidy up their mailbox and you force delete out their RecoveryItems folders, you will essentially be creating free whitespace to store more messages but the size of your database will never shrink below it’s current state. To actually shrink size of the database file, you will have to do the following:

  1. Have the end users get rid of all their unimportant emails and empty their Deleted Items folder.
  2. Purge all of the user’s RecoveryItems folders. To learn how, read this.
  3. Either create a new mailbox database, mount it, move all the mailboxes to it, then dismount and delete the old database

    — OR —
    Dismount the databases and run the defrag utility

Either way, both scenarios are extremely time consuming so get your blanket and sun tan lotion because you’re never getting off that beach, just the way you never got into the NHL, ya jackass!
Continue reading “Exchange Server 2010 – Shrink Database Size – OR – Reclaim Lost Database Storage Space”