What is the reason of the error on title? I tested mysql query at Mysql Front and no problem. My script is below. Thank you.
$fbFoodPerma = $fbSiteID."-".$fbFoodPerma;
$sql = mysql_query("
SELECT fbFoodPerma
FROM fbFoods
WHERE fbFoodPerma
LIKE '$fbFoodPerma'") or die(mysql_error());
$isStored = mysql_result($sql,0,"fbFoodPerma");
while ($isStored == "$fbFoodPerma") {
$fbFoodPerma = $fbFoodPerma."-";
$sql = mysql_query("
SELECT fbFoodPerma
FROM fbFoods
WHERE fbFoodPerma
LIKE '$fbFoodPerma'") or die(mysql_error());
$isStored = mysql_result($sql,0,"fbFoodPerma");
}