Ive finally found out how to do it, its actually a UNION query and not a Join, since join requires a fields with the exact same data, wich a union query will fuse the data together even tho theres no data resemblance in none of youre tables.
this is the link where i found my info:
here my code for people who would be looking how to do this too.
-so this code will search my mysql database for a document name and the link for that document.
-and will make a search box where you only need to input a single letter and it will give you a list of all entries from the database where the letter youve inputed in found.
-then it will make a list where you see the name of the documents, ad if you click on the name it will open the document.
<?php <br mode="hold" /?>