Hello
I have a database with the followong tables and fields
documents - with fields doc_id, doc_tile, doc_url
doc_types - with fields doc_id and type_id
types - with fields type_id
doc_consultees - with fields doc_id and consultee_id
consultees - with field consultee_id
I have managed to join the documents table with the types tables by using the table doc_types in an INNER JOIN.
My code for this is as follows
"SELECT doc_url, doc_title
FROM documents INNER JOIN
(types INNER JOIN doc_types
ON types.type_id=doc_types.type_id)
ON doc_types.doc_id=documents.doc_id
WHERE types.type='".$POST['type_search']."'
AND doc_date_yr = '".$POST['year_search']."'"
However I now want to draw informattion from the consultees table too. And have documents pulled out by a query that have a particular consultee_id AND a particular type_id.
So I have been trying to do this and so far have not been successful.
Any help on how to join these 5 tables together much appreciated
:-)