Welcome Guest, Not a member yet? Register   Sign In
how to write this sql with active record
#3

(03-18-2021, 08:09 AM)php_rocs Wrote: @venance,

Have you thought about using query binding (https://codeigniter.com/user_guide/datab...y-bindings) instead?  This way you can put the query in  as you have it above.
Yes I have used it, but because I want to use paginate(), the query() didn't work.
All I want to get data and use pager
PHP Code:
$this->table("mytable")->paginate(5); 
But  if I query() I will get data but I won't be able to paginate them like:
PHP Code:
$sql "mystatement";
$this->db->query($sql); 
Reply


Messages In This Thread
RE: how to write this sql with active record - by venance - 03-18-2021, 08:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB