Help me traverse my query database result into each row and each column? - 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: Help me traverse my query database result into each row and each column? (/showthread.php?tid=42589) |
Help me traverse my query database result into each row and each column? - El Forum - 06-11-2011 [eluser]Edy S[/eluser] Hi, im new in codeIgniter, now that i have the problem to traverse my query result . here is my code i juts try to learn : This is the code of my Blogmodel Code: <?php And this is the code in my controller called blog Code: <?php Then my problem is how to traverse result from Code: $data['post'] = $this -> Blogmodel ->get_last_ten_entries(); Then what should i do if i want to use each column, for example if i want to use it in the link : Code: http://example.com/index.php/blog/my_post_id_here Thanks for everybody who can help resolve my problem... Help me traverse my query database result into each row and each column? - El Forum - 06-12-2011 [eluser]jmadsen[/eluser] it's an array, Edy, so just use a foreach statement in your view is fine i.e., Code: <?php (if a mod reads this,can you move to the correct area?) Help me traverse my query database result into each row and each column? - El Forum - 06-12-2011 [eluser]Edy S[/eluser] Thanks jmadsen, well my problem havebeen resolved now... I'm so sorry i just new in this forum, so that i dont really know where should i post my problem.. |