![]() |
How to get all records of a table ? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How to get all records of a table ? (/showthread.php?tid=47896) |
How to get all records of a table ? - El Forum - 12-27-2011 [eluser]Unknown[/eluser] Hello, I'm trying to create a page displaying (biological) data stored in a table named MARKER (Oracle database 11.2.0.1.0, CI 2.1.0). I've got a model with a function : Quote: I've got my controller : Quote: public function allMarkers() It works well, I have managed to get a paginated view of my 47 607 markers currently stored (49 pages with 1000 markers on each). I have tried to add a link in order to download a file holding all these values (users want to get all data in a file). Code: public function getMarkersFileTest() This failed, the file is not created ! And I do not get any error (even with error_reporting(ALL); and ini_set('display_errors', 1); in index.php). I must use the limit and offset param and make a loop until all results are gotten : Code: public function getMarkersFile() Using Limit and Offset param is easy using Active Record Class but when I want to launch more complex queries (SELECT M.marker_id, m.marker_name, t.scientific_name FROM marker m , taxon t WHERE m.TAXON_ID = t.taxon_id), I don't know what to do. Creating a simple "select * from table" and backup these data into a file seems to be impossible with CodeIgniter ? Thank you for any idea ! Fred |