No problem about newbie questions, just make sure you do you share of research before you post a question, because most of the time the answers are right there in the manual or in other posts (they don't call them frequenstly asked questions for nothing)
:-)
A URL can not interact with a DB directly (for obvious reasons)
You will have to create some script that processes the values that you get from 'outside PHP' as described in the manual, and use those to fetch the proper data from the database.