Welcome Guest, Not a member yet? Register   Sign In
An example of easy model usage
#4

[eluser]Dam1an[/eluser]
The way I do it (well, in most cases) is I have object tables and relational tables
Object tables is a 'thing' and has an auto ID
A relational table is... well, self explanatory really

I only have models for the object tables, and they then have methods which deal with the relational tables
So if I have an accounts, users and account_users table, I'd have Account_model and User_model and the relationship would be Account_model (method would be get_users)

Although every now and again it just seem to logical to have the relationship in the other table (or maybe in both :-S)


Messages In This Thread
An example of easy model usage - by El Forum - 05-30-2009, 10:54 AM
An example of easy model usage - by El Forum - 05-30-2009, 11:41 AM
An example of easy model usage - by El Forum - 05-30-2009, 11:48 AM
An example of easy model usage - by El Forum - 05-30-2009, 11:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB