I'm searching couple of hours in google for find a solution but not found yet. So, I'm asking at the end. I have simple query. I need to check query return a result or not. Here it is:
$content = ORM::for_table("pages")->where("deleted",0)->find_one($id);
if ($content->count() > 0) {
... do something
}
Above code block returns below error:
Fatal error: Call to a member function count() on boolean.....
How do I check if result set has rows or not ?