I am unable to display the correct results on my website. I am using PHP and MySQL. I would consider myself a beginner with PHP and MySQL. I am using the MySQLi procedural method.
Okay, here is the problem I am having.
A user will land on a browse_models.page which displays an assortment of different model thumbnails. When the user clicks on a model thumbnail they are sent to a model_details.page which has a has larger photo of the model along with specific details unique to that particular model.
At the bottom of the model_details.page are thumbnails that represent the update or updates the particular model has done on the website along with the name or names of each model featured in the particular update.
I am sending a GET request with the model_id and update_id from the browse_models.page to the model_details.page. I am able to display all the correct information except for the names of the featured models in a particular update.
If a models has done 2 or more updates and at least 1 of the updates contains 2 or more models, I can't display the correct names with each update.
For example Model A has done 3 updates for the site, update 1, update 2, and update 3. In update 2 ,Model A also appears with Model B.
The result should be: update 1- features: Model A update 2 - features: Model A and Model B update 3 - features: Model A
This is not what I'm getting.
What I'm getting is:
update 1 - features: Model A and Model B update 2 - features: Model A and Model B update 3 - features: Model A and Model B
I know I need to find out what model or models are associated with what update. I am working with a database with 3 tables, updates, models, and updates_models (linking table).
Any help or insight into this issue would be greatly appreciated ...