Welcome Guest, Not a member yet? Register   Sign In
$this->db->orderby ?
#9

[eluser]outtolunch[/eluser]
Thanks a lot for your help, thats what I was looking for.

Just I've got one more problem with pagination.

I use CI pagination class.

my data model looks like that at the moment:

$query = "SELECT * FROM companies WHERE area='$area' AND category='$category' AND status='active' ORDER BY sub_area='$sub_area' DESC, sub_area DESC";
$companies = $this->db->query($query);

return $companies;

If I add into SQL query the LIMIT $limit, $offset I start getting some syntax errors about the ','.

Is there a way to use $this->db->limit($limit, $offset); ?

Lets say use $this->db->query($query), then $this->db->limit($limit, $offset) and return mysql result.


Messages In This Thread
$this->db->orderby ? - by El Forum - 03-09-2010, 06:03 AM
$this->db->orderby ? - by El Forum - 03-09-2010, 07:13 AM
$this->db->orderby ? - by El Forum - 03-09-2010, 07:17 AM
$this->db->orderby ? - by El Forum - 03-09-2010, 07:22 AM
$this->db->orderby ? - by El Forum - 03-09-2010, 10:05 AM
$this->db->orderby ? - by El Forum - 03-09-2010, 12:50 PM
$this->db->orderby ? - by El Forum - 03-09-2010, 01:05 PM
$this->db->orderby ? - by El Forum - 03-09-2010, 02:50 PM
$this->db->orderby ? - by El Forum - 03-09-2010, 03:14 PM
$this->db->orderby ? - by El Forum - 03-09-2010, 03:48 PM
$this->db->orderby ? - by El Forum - 03-09-2010, 05:36 PM
$this->db->orderby ? - by El Forum - 03-09-2010, 07:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB