Welcome Guest, Not a member yet? Register   Sign In
Models, foreign keys and table associations - whats best practise in codeigniter?
#6

[eluser]Colin Williams[/eluser]
Quote:I presume is to stitch the data together from the model into a array that is nicely useable in the view?

Exactly. This is what the automated ORM libraries do based on a set of conventions you must follow. There's no difference in the implementation behind it: Iterate over the result, group rows by their primary keys.

Also, this should be done in the model. Controllers shouldn't be bothered with modeling the data.


Messages In This Thread
Models, foreign keys and table associations - whats best practise in codeigniter? - by El Forum - 12-23-2009, 04:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB