mysql - PHP static function does not die -
class mysql { static function query($q){ return mysql_query($q)or die(mysql_error()); } }
class mysql
echo mysql::query('select * unknown_table');
it must die , display mysql error not.
do static functions go way?
(basically die()
work, mysql_query()
needs return falsy - putting false
there lets me test short circuit evaluation).
show me code relevant problem, please.
does work valid query?
Comments
Post a Comment