Part of the EllisLab Network
   
2 of 2
2
MSSQL Pagination Holly Grial?
Posted: 22 December 2008 12:56 PM   [ Ignore ]   [ # 16 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  154
Joined  12-01-2008

Ah thanks for the explaination, i’m still getting the “Unsupported feature of the database platform you are using.” error message for some reason.  And I can’t figure out where it is screwing up.  I mean it should be as simple as writing $this->db->limit($limit, $offset);

But that doesn’t seem to want to work.

Profile
 
 
Posted: 23 December 2008 10:13 AM   [ Ignore ]   [ # 17 ]  
Grad Student
Rank
Total Posts:  49
Joined  10-05-2006
whobutsb - 22 December 2008 05:56 PM

Ah thanks for the explaination, i’m still getting the “Unsupported feature of the database platform you are using.” error message for some reason.  And I can’t figure out where it is screwing up.  I mean it should be as simple as writing $this->db->limit($limit, $offset);

But that doesn’t seem to want to work.

it should be! are you sure that the error comes from the _limit method?

Profile
 
 
Posted: 23 December 2008 02:13 PM   [ Ignore ]   [ # 18 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  154
Joined  12-01-2008

ZOMG! I figuerd it out!!
Here is how my model should’ve looked:

function get_all_contacts($limit$offset){
        $this
->db->select('contactID, firstname, lastname');
        
$this->db->limit($limit$offset); 
        
$this->db->from('tblContact'); 
        
$query $this->db->get();
        
$result $query->result();
        return 
$result
    

Then in my Controllers I needed:

$data['contactResults'$this->contact_model->get_all_contacts(200

Thank you for all your help.  And sorry for being a pain in the ass with this issue!

Profile
 
 
Posted: 24 December 2008 08:22 AM   [ Ignore ]   [ # 19 ]  
Grad Student
Rank
Total Posts:  49
Joined  10-05-2006
whobutsb - 23 December 2008 07:13 PM

Thank you for all your help.  And sorry for being a pain in the ass with this issue!

wink

Profile
 
 
   
2 of 2
2