why I can't do like this?
<?php
class core {
public static $db;
function __construct() {
$this->db = new mysql('host', 'user', 'pw', 'db');
}
}
class stat extends core {
public static function log() {
core::$db->query("insert into mytable values(now())");
}
}
// do something
stat::log();
?>