• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SQL functions on DB class

#1
Hello,

Is there a way to run SQL function with the CI db class?(ie: COMPRESS(?))

In slim framework I'm using it in this way:


PHP Code:
$data = array(
       "userid" => $userid,
      "data" => $this->db->func('COMPRESS(?)', [json_encode($data)]),
);

 $db_insert $this->db->insert("products"$data); 

Is there something similar in CI?

Thanks! Smile
Reply


Messages In This Thread
SQL functions on DB class - by tibon - 08-11-2017, 05:20 PM
RE: SQL functions on DB class - by tibon - 08-12-2017, 08:00 AM
RE: SQL functions on DB class - by Project404 - 08-12-2017, 12:59 PM
RE: SQL functions on DB class - by skunkbad - 08-12-2017, 01:15 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.