I have a table that contains two ids. I'd like to select the data from the first table along with two rows from additional tables. Maybe I'm missing the obvious here, how do I grab multiple rows when I'm starting with two id's?
Table 1 = Intial SELECT
id | document1_id | document2_id
SELECT FROM table1 document_id1, document_id2
Table 2
document_id | document_title | document_description
I need to get the two rows that match document_id1 and document_id2. This is where I started to nest selects. This hasn't been working. I could do two JOINS here?
Table 3
document_id | document_filename
I also need two rows here that also match document_id1 and document_id2. Seems like whatever I do above should also work for here.
I've shortened the number of actual columns in the tables to simply illustrate what I'm hoping to accomplish. To begin with, does this look like a good setup for the data? If yes, is there a simple method to select the data? Currently, I have a bunch of nested selects which is getting out of control and seems to be counter-productive. Anyways, as always any help or guidance is appreciated. Thanks.