Library of CodeIgniter Reviewed by Momizat on . Library is just a collection of routines or class definitions(object oriented programming). The reason behind is simply code reuse, i.e. get the code that has a Library is just a collection of routines or class definitions(object oriented programming). The reason behind is simply code reuse, i.e. get the code that has a Rating: 0

Library of CodeIgniter

Library is just a collection of routines or class definitions(object oriented programming). The reason behind is simply code reuse, i.e. get the code that has already been written by other developers. The classes or routines normally define specific operations in a domain specific area.

<?php defined('BASEPATH') OR exit('No direct script access allowed');

class Properties
{
	private $_db;
	private $_ci;
	
	function __construct()
	{
		$this->_ci = &get_instance();
		$this->_db = $this->_ci->load->database("default",true);		
		$this->_ci->load->library('session');		
	}
       function getdestination($parentid)
	{		
		$parent = $parentid;
		$array = array('parent' =>$parent);	
		$this->_db->select('*');
		$this->_db->from('tbl_destination');
		$this->_db->where($array);
		$this->_db->order_by("destinationname","ASC");
		$query = $this->_db->get(); 				
		$result=$query->result();
		$cnt=$query->num_rows();
		return $result;
	}
}
?>

Leave a Comment

© 2014 Powered By