I'm kind of stuck with this error whenever I am trying to execute my app. I am quite new with program development and I am doing this app as a way for me to learn... but I don't know where to look to find a solution. If someone gives me some guidance on where to look it will be awesome.
Fatal error: Uncaught Error: Call to a member function consultarSQL() on null in /Users/gabriel/Documents/workspace/website_derom/classes/ActiveRecord.php:148 Stack trace: #0 /Users/gabriel/Documents/workspace/website_derom/admin/index.php(11): App\ActiveRecord::all() #1 {main} thrown in /Users/gabriel/Documents/workspace/website_derom/classes/ActiveRecord.php on line 148
This is my line of code where the error appears:
// Method to activate all properties
$properties = Property::all();
$vendors = Vendor::all();
// List all records
public static function all() {
$query = "SELECT * FROM " . static::$table;
$result = self::$db->querySQL($query);
return $result;
}
I want to try to solve this problem to be able to run my application