
SELECT type_files.html_embed_before
, script_files.path
, type_files.html_embed_after
FROM type_files
INNER JOIN script_files ON (type_files.type = script_files.type)
the above code gives me information for all script_files. I want to build on the query and get
script_files.id = script_match.file_id
script_matches.ap_id equal to article.head, header.head OR footer.head.
The Id for article, header, footer will be passed in