If I would like to have several static methods in my models so I can say User::get_registered_users()
and have it do something like
public static function get_registered_users()
{
$sql = "SELECT * FROM `users` WHERE `is_registered` = 0";
$this->db->query($sql);
// etc...
}
Is it possible to access the $this->db
object or create a new one for a static method?