I'm looking to give my users an option from a drop down menu to select which query they want to run and then when clicked on the menu triggers the query to run. I'm thinking something like....
Name-----Address----Sales Person----Full Report--
So for example if the user clicked the full report option from the menu it would trigger this query.
'SELECT DISTINCT jsfdName.baseData AS Name, jsfdAddr.baseData as Address,
jsfdZip.baseData AS Zip, jsfdCity.baseData AS City, jsfdState.baseData AS State,
jsfdEmail.baseData AS Email,jsfdPhone.baseData AS Phone, jsfdPerson.baseData AS Person,
jsfdContacted.baseData AS Contacted
FROM jos_sobipro_field_data AS jsfdName
JOIN jos_sobipro_field_data AS jsfdAddr USING(sid)
JOIN jos_sobipro_field_data AS jsfdZip USING(sid)
JOIN jos_sobipro_field_data AS jsfdCity USING(sid)
JOIN jos_sobipro_field_data AS jsfdState USING(sid)
JOIN jos_sobipro_field_data AS jsfdEmail USING(sid)
JOIN jos_sobipro_field_data AS jsfdPhone USING(sid)
JOIN jos_sobipro_field_data AS jsfdPerson USING(sid)
JOIN jos_sobipro_field_data AS jsfdContacted USING(sid)
WHERE jsfdName.fid = 36 AND jsfdAddr.fid = 37 AND jsfdZip.fid=38 AND jsfdCity.fid = 39
AND jsfdState.fid = 41 AND jsfdEmail.fid = 65 AND jsfdPhone.fid = 46 AND jsfdPerson.fid
= 66 AND jsfdContacted.fid = 63 AND sid > 900';
Any ideas? I'm trying to do this all in one file too because I want it to be password protected so that only users can access it. Thanks for the help guys.