Update class.www-database.php

check the connection is established or not, otherwise the pdo object is false(non-object)