Refs #31, fixes some bugs in mysqli to PDO conversion.