コード例 #1
0
    }
    if (isset($_POST['last_name'])) {
        $search_array['last_name'] = $_POST['last_name'];
    }
    if (isset($_POST['email'])) {
        $search_array['email'] = $_POST['email'];
    }
    if (isset($_POST['marks'])) {
        $search_array['marks'] = $_POST['marks'];
    }
    if (isset($_POST['perpage'])) {
        $pageination_data['perpage'] = $_POST['perpage'];
    }
    if (isset($_POST['pageno'])) {
        $pageination_data['pageno'] = $_POST['pageno'];
    }
    if (isset($_POST['orderby'])) {
        $pageination_data['orderby'] = $_POST['orderby'];
    }
    if (isset($_POST['ordertype'])) {
        $pageination_data['ordertype'] = $_POST['ordertype'];
    }
    $students = new dbOperations();
    $resultArray['data'] = $students->pagination($search_array, $pageination_data, $getCountOffields, $selectableFilds);
    $resultArray['status'] = 1;
    echo json_encode($resultArray);
} catch (Exception $e) {
    $resultArray['status'] = 0;
    $resultArray['error'] = $e->getMessage();
    echo json_encode($resultArray);
}
コード例 #2
0
    if (isset($_POST['rollnumber'])) {
        $search_array['rollnumber'] = $_POST['rollnumber'];
    }
    if (isset($_POST['first_name'])) {
        $search_array['first_name'] = $_POST['first_name'];
    }
    if (isset($_POST['last_name'])) {
        $search_array['last_name'] = $_POST['last_name'];
    }
    if (isset($_POST['email'])) {
        $search_array['last_name'] = $_POST['email'];
    }
    if (isset($_POST['marks'])) {
        $search_array['marks'] = $_POST['marks'];
    }
    if (isset($_POST['israngeChanged'])) {
        $israngeChanged = $_POST['israngeChanged'] == "true" ? true : false;
    }
    if (isset($_POST['isselectionChanged'])) {
        $isselectionChanged = $_POST['isselectionChanged'] == "true" ? true : false;
    }
    $students = new dbOperations();
    $studentslist = $students->search($search_array, $getCountOffields, $israngeChanged, $selectableFilds, $isselectionChanged);
    $resultArray['data'] = $studentslist;
    $resultArray['status'] = 1;
    echo json_encode($resultArray);
} catch (Exception $e) {
    $resultArray['status'] = 0;
    $resultArray['error'] = $e->getMessage();
    echo json_encode($resultArray);
}