Welcome Guest, Not a member yet? Register   Sign In
Many-to-Many Relationships & Active Record Class
#2

[eluser]gtech[/eluser]
are you trying to select the data? in which case you can do a join
Code:
//untested buy you get the idea
$this->db->select('*');
$this->db->from('ci_news_to_categories');
$this->db->join('ci_news','ci_news_to_categories.category_id = ci_news.id');
$this->db->where('subject','I love cheese');
$res = $this->db->get();

and then you can loop through the results to find all the category ids. Or you could do then join in a different way.

or are you asking how to insert the data?


Messages In This Thread
Many-to-Many Relationships & Active Record Class - by El Forum - 11-27-2007, 09:00 AM
Many-to-Many Relationships & Active Record Class - by El Forum - 11-27-2007, 10:07 AM
Many-to-Many Relationships & Active Record Class - by El Forum - 11-27-2007, 10:16 AM
Many-to-Many Relationships & Active Record Class - by El Forum - 11-27-2007, 11:32 PM
Many-to-Many Relationships & Active Record Class - by El Forum - 11-28-2007, 02:44 AM
Many-to-Many Relationships & Active Record Class - by El Forum - 11-28-2007, 03:00 AM
Many-to-Many Relationships & Active Record Class - by El Forum - 11-28-2007, 08:41 AM
Many-to-Many Relationships & Active Record Class - by El Forum - 11-28-2007, 09:00 AM
Many-to-Many Relationships & Active Record Class - by El Forum - 11-28-2007, 10:07 AM
Many-to-Many Relationships & Active Record Class - by El Forum - 11-28-2007, 11:02 AM
Many-to-Many Relationships & Active Record Class - by El Forum - 11-28-2007, 11:49 AM
Many-to-Many Relationships & Active Record Class - by El Forum - 11-28-2007, 12:33 PM
Many-to-Many Relationships & Active Record Class - by El Forum - 11-28-2007, 08:46 PM
Many-to-Many Relationships & Active Record Class - by El Forum - 12-05-2007, 11:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB