[eluser]eoinmcg[/eluser]
the problem is that $num and $offset are both strings and not integers. when sql binds the variables into the query it wraps strings with the backtick character, e.g. `2`. in your case this results in an invalid query
this will work
Code:
public function get_users($num, $offset)
{
$num = (int) $num;
$offset = (int) $offset;
$sql = “SELECT * FROM login LIMIT ? OFFSET ?”;
$data[‘dbquery’] = $this->db->query($sql, array($num, $offset));
return $data[‘dbquery’];
}