Where Query |
[eluser]Yash[/eluser]
function ReadComments($UrlTitle) { $this->db->where(array('UrlTitle'=>$UrlTitle)); $query = $this->db->get('comments'); $posts = $query->row_array(); return $posts; } It return only one row. I want all of the rows for where query.
[eluser]daulex[/eluser]
Put the readcomments($urltitle) in a foreach loop in the template? There is an example of a froeach loop in a video tutorial made by Derek Jones.
[eluser]Yash[/eluser]
I'm putting everything in a array. I know foreach. Is my code is right? if yes why only one row [in array]
|
Welcome Guest, Not a member yet? Register Sign In |