Boa tarde tudo blz ? espero que sim
Estou com um problema de na minha class que me retorna assim: Using $this when not in object context
public function __construct($id = null) {
$this->db = DB::getInstance();
if($id != null) {
$this->load($id);
}
}
public static function InscricoesExists($id) {
// BEM AQUI TA DANDO O ERRO NO $this->db-executeSql
$this->db->executeSql("SELECT `id` FROM `custom_inscricoes` WHERE `id` = '{$id}'");
if($this->db->getNumRows() > 0) {
return true;
} else {
return false;
}
}
Como posso arrumar ?