public function getFarmerName($id) { $modelFarmers = new Model_Farmers(); $farmer = $modelFarmers->fetchFarmerById($id); return $farmer->names; }
public function getFarmerNameByPhone($phoneno) { $modelFarmers = new Model_Farmers(); $farmer = $modelFarmers->fetchFarmerByPhone($phoneno); return $farmer->names; }
public function farmerMenu($user, $no) { $menuModel = new Model_Menu(); $menu = $menuModel->getMenu(5); // print_r($menu); // exit; $menu_id = $menu->id; //get the description $description = $menu->description; // print_r($description); // exit; //build up the options $menuItemsModel = new Model_MenuItems(); $menuOptions = $menuItemsModel->getMenuOptions($menu_id); // print_r($menuOptions); // exit; $farmerModel = new Model_Farmers(); $data = array('session' => 1, 'step' => 1, 'menu_item_id' => 5); //$userModel = new Model_User(); $result = $farmerModel->updateUserData($data, $user['id']); //print_r($result); //exit; //$result = $userModel -> updateUserSession($user['id'],1); return $description . PHP_EOL . $menuOptions; //exit; }