does ci support relational db |
[eluser]dsi[/eluser]
hi, i m new to ci and i can't figure out how does ci work with relational db. I mean i have 2 tables in db and 1 table has id of another table's content, how do i get another content using that tables id? i have to use loop to echo the content of the 1st table, so can't use another loop, just confused, if u need db structure i can provide.
[eluser]Bart v B[/eluser]
i don't understand youre question. a relational database has nothing to do with CI or other frameworks. You want to JOIN two table together, with active Records i gues.. Take a look in the manual http://ellislab.com/codeigniter/user-gui...ecord.html Code: $this->db->select('*'); I would not recomend this example, but just play with it.
[eluser]theprodigy[/eluser]
just build your query around it. Example: Code: $this->db->select('u.first_name, u.last_name, a.street, a.city, a.state, a.zip');
[eluser]Jelmer[/eluser]
You could also try an ORM. Search the forums for DMZ, RapidDataMapper or Doctrine. |
Welcome Guest, Not a member yet? Register Sign In |