Changed to using constants and PDO. This should likely be made into a DRUSH command as part of mtools at some point