My controller:
$category = new Category();
$success = $category->getParentCategory($id);
My model:
public function getParentCategory($id){
$query = $this->modelsManager->createQuery("SELECT * FROM Category WHERE parent_id = :parent_id: AND flag = 0");
$result = $query->execute(array(
'parent_id' => $id
));
return $result;
}
but I'm unable to get the id parameter.