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

(12-18-2018, 04:00 PM)php_rocs Wrote: @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());
   


i use the last Version (3.1.9), does not give any kind of error, and the permits are the right ones. that might be failing?
Reply


Messages In This Thread
RE: How implement cache on Search query sql - by Decibel150 - 12-19-2018, 03:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB