I'm trying to create a application for my enginnering department, that tracks enginneering request changes, the first table consits of request-number,dates, and who requested it, the other table consists of all the notes that is tied to the first table by request-number.
I was able to bring in all the fields in both tables together by doing a left join. I'm using a left join because there may not be any notes for a particular request-number but they still need to see whats in the first table.
The enginneers would like to be able to search for a certain request-number. So my question is can you do a where clause while also using a LEFT JOIN, because I tried and cant seem to get it to work. Does anybody have any ideas.
SELECT * FROM tbl_ecr
LEFT JOIN tbl_ecr_notes USING(eng_request_num)
// I would like to be able to use a search
SELECT * FROM tbl_ecr
LEFT JOIN tbl_ecr_notes USING(eng_request_num)
WHERE eng_request_num = $findnum