SQL Variable Problem

What is wrong with the following $sql it doesnt return any errors or data. If I take the statement that is echoed and replace the $sql = with the statement inside double quote it works. I tried adding quotes to the string but that didnt work either.

$sql = $SQL_Main . “” . $SQL_Shoe . “” . $SQL_Max . “” . $SQL_Brand;

echo $sql;

if(!$result = $db->query($sql)){
die(‘There was an error running the query [’ . $db->error . ‘]’);
}
Thanks
Mark

if any of those variables are strings, they need to be in quotes.

Sponsor our Newsletter | Privacy Policy | Terms of Service