[eluser]fs_xyz[/eluser]
I guess, I end up bothering you people with loads of questions. -_-
Why does it always produce error message when parsing offset into normal sql query writing ?
Example :
$this->db->query('select * from table limit'.$offset.','.$limit'');
What I parsed into $offset is $this->uri->segment(3).
Yes, this is about pagination.
That always produce an error, $offset doesn't have a value.
I thought I misplaced them, so I switch their place but still the same.
But if I use :
$this->db->select('*');
$this->db->from('table');
$this->db->limit($limit,$offset);
It always work. Yes, using the same parsing value which is $this->uri->segment(3).
I choose using $this->db->query, freedom to write query is quite large compared to use template like $this-db->select. Problem is that limit. Wonder how to make it work if the parsed info is $this->uri->segment(3). ( or whatever number inside the bracket )
Previous 2 questions already had simple answer, hopefully this one won't make me face palm again.....