Welcome Guest, Not a member yet? Register   Sign In
How implement cache on Search query sql
#2

(This post was last modified: 12-18-2018, 04:09 PM by php_rocs.)

@Decibel150,

What version of CI are you using?  Is the CI cache directory writable? Are there any errors in the CI log file? Also, have you tried this...


PHP Code:
public function search($product)
   {
       $this->db->cache_on();
       $data $this->db
           
->select('name, slug')
           ->from('products')
           ->like('name'$product)
           ->or_like('slug'$product)
           ->limit(5)
           ->get();
        $this->db->cache_off();

       return json_encode($data->result_array());
   
Reply


Messages In This Thread
RE: How implement cache on Search query sql - by php_rocs - 12-18-2018, 04:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB