Show a register database. - 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: Show a register database. (/showthread.php?tid=20310) |
Show a register database. - El Forum - 07-05-2009 [eluser]Browser[/eluser] Hello, i want to show a register of database. return $query->result(); How can i show it without to used a foreach ? In a foreach i use $query as $q { echo $q->total; } Show a register database. - El Forum - 07-05-2009 [eluser]ChrisMiller[/eluser] Not sure of your question exactly but do you mean something like this? Code: $result = $query->result_array(); or Code: $result = $query->result(); If this is not what you are looking for maybe you could explain your question a little better. Show a register database. - El Forum - 07-05-2009 [eluser]guidorossi[/eluser] I think you're looking for something like: Code: $this->db->select('name, age'); |