⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

how to fetch search result



dhoni223
  • profile picture
  • Member

Posted 12 February 2018 - 04:32 AM

       public function printing()
    {
             
        $crud = new RMCL_grocery_CRUD();
        $crud->set_table('wp_rmcl_pub_subscription');
        $this->load->library('labels');  
        $config['format'] = 'word';  
        $config['layout'] = "subscriber_name<br />house_number,road<br />layout,city<br />state-pincode";  
        $this->labels->initialize($config);  
        $connect=mysqli_connect('localhost','root','123456','armdb');
        $result=mysqli_query($connect,"select * from wp_rmcl_pub_subscription");
        while($row=mysqli_fetch_array($result))
        {
        $addresses[] = array(  
                         'subscriber_name'=>$row['subscriber_name'],  
                         'road'=>$row['road'],
                         'layout'=>$row['layout'],
                         'house_number'=>$row['house_number'],
                         'state'=>$row['state'],
                         'pincode'=>$row['pincode'],
                         'city'=>$row['city'],
                         'pincode'=>$row['pincode'],
            );  
    }
// Ou

i want to store search result in $addresss