so basically I am trying to write a php script that can be uploaded to a server and be located somewhere on my site to click. Then when it's clicked, it runs the mysql query and displays the information needed....This is what I have so far.
--Connect.php--
$dbhost = 'localhost';
$dbuser = '******';
$dbpass = '******';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die
('Error connecting to mysql');
$dbname = '*****';
mysql_select_db($dbname);
?>
--the mysql command I need to have the php file run is
SELECT jsfdName.baseData AS Name,
jsfdAddr.baseData as Address,
jsfdZip.baseData AS Zip,
jsfdCity.baseData AS City,
sfdCounty.baseData AS County,
jsfdState.baseData AS State
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 jfsdCounty USING(sid)
JOIN jos_sobipro_field_data AS jfsdState USING(sid)
WHERE jsfdName.fid = 36 AND jsfdAddr.fid = 37 AND jsfdZip.fid=38 AND jsfdCity.fid = 39
AND jsfdCounty.fid = 40 AND jsfdState.fid = 41 AND sid > 329
So how do I write the php script to run this file within my website?
Thanks
WHEREclause?