I have a favorites table where the user identifies a favorite company.
The table structure has:
id autoincrement int
userid which is the users id
companyid which is the numeric id of the company that is one of their favorites
In the view of the company table I have an almost beautiful display of that company
If the list of the favorties table I have joined the company table so I can pick up the name so the list shows that and the phone number
company name, phone number
When the user clicks on the list item I would like to really use the view from the company table for that company. Obviously I would need a way to pass the companyid to the company view when it opens.
I can't find a way to do that. Is this possible?
I hate to try to duplicate the pretty company view I have now in the favorites view because I very easily could need to make changes to the company view and I would hate to have to make the change and code in two or more places. I also have some buttons in the company view and trying to duplicate this would be tough.
If there is a simple way to copy the view from the company table to the view of the favorites, maybe I could figure out a way to make that work, but it would still not be easy I don't think.
Any help would be appreciated.