Update class.db.php

Error handling and performance of secure code.
line : 476