Link to home
Start Free TrialLog in
Avatar of pingeyeg
pingeyeg

asked on

SQl statements getting parse errors

Can you tell me what looks wrong with this?

$PremiumFound = false;
$NormalFound = false;

$conn = mysql_connect("","","");
mysql_select_db("providers",$conn);

$SQLStrings(0) = mysql_query("SELECT Top 1 * FROM tblAdspace where tblAdspace.strProviderservice = '" .$_REQUEST['strProviderservice']. "' AND (tblAdspace.strZipcode = '" .$_REQUEST['strZipcode']. "' OR tblAdspace.strTown = '" .$_REQUEST['strTown']. "') AND  tblAdspace.strAd_size = 'Premium'")
or die(mysql_error());

$SQLStrings(1) = mysql_query("SELECT * FROM tblAdspace where tblAdspace.strProviderservice = '" .$_REQUEST['strProviderservice']. "' AND (tblAdspace.strZipcode = '" .$_REQUEST['strZipcode']. "' OR tblAdspace.strTown = '" .$_REQUEST['strTown']. "') AND  tblAdspace.strAd_size = 'Basic' ")
or die(mysql_error());
ASKER CERTIFIED SOLUTION
Avatar of elfe69
elfe69
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pingeyeg
pingeyeg

ASKER

I don't know, I'm still getting the error.
What is the error you get ?
Parse error: parse error in /Library/WebServer/Documents/providers.php on line 357
The error you get is not an SQL error, but a PHP parse error: the code in your PHP page is not correct, look at line 357 in your providers.php file
I don't understand.  Does that mean that maybe I have a quote or double quote wrong or missing?  Is it referring to a syntax error?
Yes, you have certainly a syntax error in your PHP code