39 lines
953 B
PHP
39 lines
953 B
PHP
<?php
|
|
/**
|
|
* Date: 11/9/17
|
|
* Time: 5:28 PM
|
|
*/
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class University_model extends CI_Model
|
|
{
|
|
|
|
/*
|
|
* get university details
|
|
* params:
|
|
* created by kdk
|
|
* */
|
|
|
|
/*
|
|
* get University Details
|
|
*/
|
|
|
|
// get university list
|
|
|
|
public function get_university_list() {
|
|
$this->db->select('*');
|
|
$this->db->order_by('CreatedOn', 'DESC');
|
|
$this->db->from(UNIVERSITY);
|
|
$univDetails = $this->db->get();
|
|
$universityDetails = $univDetails->result();
|
|
if (count($universityDetails) > 0) {
|
|
$results['univList'] = true;
|
|
$results['university_details'] = $universityDetails;
|
|
} else {
|
|
$results['univList'] = false;
|
|
$results['message'] = 'No record found';
|
|
}
|
|
return $results;
|
|
}
|
|
|
|
} |