Welcome Guest, Not a member yet? Register   Sign In
Simple question get_where() function
#6

[eluser]codelogic[/eluser]
[quote author="deep_sheera" date="1338529899"]public function get_news_cate($slug = FALSE)
{
if ($slug === FALSE)
{
// Displays our books page.
$this->db->order_by("id", "desc");
$query = $this->db->get_where('news', array('category' => $category)); /// Is $category variable available here ???????????????
return $query->row_array();
}
//Displays a seperate page for selected listing
$query = $this->db->get_where('news', array('slug' => $slug));
return $query->row_array();
}

[/quote]

Am I using the get_where(); function correctly? I am trying to display all the data in a column in my table 'news'. The column name is 'category'. I am not sure if I am doing this right...


Messages In This Thread
Simple question get_where() function - by El Forum - 05-31-2012, 10:17 PM
Simple question get_where() function - by El Forum - 05-31-2012, 10:35 PM
Simple question get_where() function - by El Forum - 05-31-2012, 10:40 PM
Simple question get_where() function - by El Forum - 05-31-2012, 10:49 PM
Simple question get_where() function - by El Forum - 05-31-2012, 10:51 PM
Simple question get_where() function - by El Forum - 05-31-2012, 11:03 PM
Simple question get_where() function - by El Forum - 05-31-2012, 11:24 PM
Simple question get_where() function - by El Forum - 05-31-2012, 11:27 PM
Simple question get_where() function - by El Forum - 06-01-2012, 12:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB