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?

works me.

(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

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -