CodeIgniter Laravel PHP Example Javascript jQuery MORE Videos New

How to convert a string to an int in codeigniter

Often developer face this issue when try to use a interger number in where condition. So in this tutorial i am going to show you how to resolve this issue.


public function getblno($company_id){
    $this->db->select('*');
    $this->db->from('bill_of_lading');
    $this->db->where('company_id',(int)$company_id);
    $num_results = $this->db->count_all_results();
    return $num_results;
}