![]() |
Active Record and mssql_data_seek - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Active Record and mssql_data_seek (/showthread.php?tid=29911) |
Active Record and mssql_data_seek - El Forum - 04-26-2010 [eluser]0plus1[/eluser] Hi, I'm currently using active record with mssql2000, I need to use the msssql_data_seek php command, how do I do it with an Active Record query? Thank you Active Record and mssql_data_seek - El Forum - 04-26-2010 [eluser]dmorin[/eluser] On the result object that you get back after running a query, you can call $result->_data_seek($n) which calls mssql_data_seek($result_id, $n) on the query results. Note that CI intends this to be a private method, but because they don't actually declare it as private, you can call it yourself. Another option is to just call mssql_data_seek and related functions yourself specifying the first param as $result->result_id where $result is the return value of the query. Active Record and mssql_data_seek - El Forum - 04-27-2010 [eluser]0plus1[/eluser] [quote author="dmorin" date="1272314937"]On the result object that you get back after running a query, you can call $result->_data_seek($n) which calls mssql_data_seek($result_id, $n) on the query results. Note that CI intends this to be a private method, but because they don't actually declare it as private, you can call it yourself. Another option is to just call mssql_data_seek and related functions yourself specifying the first param as $result->result_id where $result is the return value of the query.[/quote] Thank you. I actually did it a bit different: ADDED a parameter in result_array called $offset. This parameter is being passed to _data_seek($offset). Active Record and mssql_data_seek - El Forum - 09-11-2012 [eluser]Beertastic[/eluser] I've tried the _data_seek() option and I'm still not getting an offset. I've checked and the function is still not officially set to private. I'm hoping my syntax is just off... any ideas? Code: public function get_data($offset, $per_page) |