Welcome Guest, Not a member yet? Register   Sign In
Cross Reference Table
#1

[eluser]dv310p3r[/eluser]
Hey all. I'm just starting out with Codeigniter and so far I really like it.

Anyways, here's my question. I have three tables: athletes, guardians, and xref_athgrd.

The athletes table hold athletes, the guardians table holds guardians and the xref tables holds the cross reference so that I can have a many to many relationship. Essentially one athlete can have many guardians, one guardian can have many athletes.

So I want to create a view that will display the athlete in one row, followed by any guardians the athlete has directly below it in other rows. I've been racking my brain for at least two days now and I can't seem to figure out how to do it. The best I've been able to come up with in my brain is that I need to somehow create in the controller an array or object that will hold all the possibilities prior to sending it to the view.

This is how I'd like it to look:

Id Name
05 Ima Athlete01
Athletes MomGuardian01 555-555-5555 [email protected]
Ahtletes DadGuardian02 555-553-5353 emaildad@emailcom
06 Mee Athletealso
Mees Momguaridan 444-444-4444 [email protected]
Mees Dadsimpotent 444-333-4343 [email protected]


Any help would be great.


Messages In This Thread
Cross Reference Table - by El Forum - 09-05-2010, 07:31 AM
Cross Reference Table - by El Forum - 09-05-2010, 10:17 AM
Cross Reference Table - by El Forum - 09-05-2010, 12:55 PM
Cross Reference Table - by El Forum - 09-05-2010, 01:08 PM
Cross Reference Table - by El Forum - 09-05-2010, 02:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB