I’m at a complete loss at the moment. It feels like things are starting to come together in my head, but it’s like they’re still so far apart that I can’t just connect everything on how to make this work.
I have three tables. I don’t need to use them all, but this is how I set them up.
horse - stores basic information for horses to build pages from
pedigree - has the horses’ pedigrees (ancestors) in here
horses - stores basic information and pedigree information
I can use my horses table to display the information on each horse that I need, along with their pedigree. What I cannot figure out how to do is to tell the database/php/what not to search each horse from the pedigree for more info.
Example being the sire. I want it to not only find the sire and bring up his name, I want it to search the table again to see if that horse’s name is in my table. If it is, I want it to display certain things on the page. Then do the process again for the siresire. (Sire and siresire are both rows in my horses table)
Or I can ask it to search the pedigree table for the sire/siresire, then ask it to search the horse table for the sire’s name, then pull up the information.
I’ve tried multi query, joins, etc. and I’m just not grasping how to make this work. If someone could please just point me in the right direction of how to make this happen - I’ve no problems studying and figuring it out, but I’ve been hitting a brick wall on this issue for months now.