function exists($k) { return $this->db->get_value("SELECT count(*) from `{$this->table}` where k=?", $k); // should return 1 or 0 }