why i am i getting this synyax error when trying to display data from the database
the code for saving the data is
// save content to db
if(isset($_POST["inpContent"]))
{
$sContent=stripslashes($_POST['inpContent']); // remove slashes (/)
$sContent=ereg_replace("'","''",$sContent); // fix SQL
$sql="UPDATE cms_core SET editorial='$sContent' WHERE id=$id";
$query = mysql_query($sql);
}
and the code to get the data from the data base is
$SQL = "SELECT cms_core FROM '$sContent' WHERE id=1";
$res = mysql_query( $SQL, $db )
or die( "<br><br><b>MySQL
Error:</b> " . mysql_errno() . " // " .
mysql_error() . "<br><br>" );
if( $res !== "" ) {
echo "Nothing in recordset.";
} else {
echo "Something in recordset.";
}
thanks if anyone can help