*@return bool the result will return true/false whether the sql query is successful */ function delete_district_task($id) { $str_query = "delete from se_district_tasks where task_id = {$id}"; return $this->query($str_query); } /** *@method boolean search_district_task_by_name() search_district_task_by_name($sn) Searches for the rows with names of district_tasks that match the pattern *@param int $sn The name of the district_task *@return boolean */ function search_district_task_by_name($sn) { $str_query = "select task_id, task_title, task_desc,clinics,due_date from se_district_tasks where task_name like '%{$sn}%'"; return $this->query($str_query); } } /** * Unit Test and usage */ $obj = new district_task(); //$obj->add_district_task('Vacination','vaccination for polio kids in the north','Berekuso clinic', '21/03/2015'); //$obj = new district_task(); $obj->get_district_task(1); $row = $obj->fetch(); print_r($row); /*if(){ echo "Task: " .$row ['task_title']; }*/ echo "hello";