[eluser]Guerra[/eluser]
Hi all, how to withdraw all news relating to certain categories? Categories output in url site/name e.g. $name = $this->uri->segment(1) :gulp: Can anyone show an example?
[eluser]Dam1an[/eluser]
You would need a lookup to get the category ID based on the name
If a news story can only have a single category, then its just a simple where clause, if it can have many categories, you will need a join in there as well
[eluser]xwero[/eluser]
Dam1an i think you took over my patience because i got tired answering questions like that. I promote you to Sr. Research Associate if i was in charge
[eluser]Dam1an[/eluser]
Thanks guys, now if you could put in a good word with the mods
And Fuzzy, after that insult, you better be careful with the coffee I serve you, never know whats going to be in it lol
[eluser]Guerra[/eluser]
Dam1an THX. How correct write this query to AR?
$Q = $this->db->query("SELECT * FROM topics, category
WHERE cat_name = category.name AND cat_name = '$name'");
return $Q->result_array();