CodeIgniter Laravel PHP Example Javascript jQuery MORE Videos New
Need a Website Or Web Application Contact : +91 9437911966 (Whatsapp) Note: Paid Service

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;
}