Modifications to db.php to handle blanks