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

SAP Web Service from .NET via WCF -

Optimized Line drawing in QT -

datetime - str to time in python -