hjælp til mysql fejl
Hej eksperter.hvad betyder denne fejl:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's motto er: "RETTE MEDARBEJDER PÅ RETTE PLADS..
min kode ser sådan herud:
<?php
require "../db.php";
if (isset($_POST['redi'])) {
$tekst = stripslashes($_POST['FCKeditor1']);
$id = intval($_POST['id']);
mysql_query("UPDATE udland SET tekst='$tekst' WHERE id=1") or die(mysql_error());
echo "<table width=\"366\" border=\"1\" bordercolor=\"#000000\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
<tr><td width=\"366\">
<table width=\"366\" cellpadding=\"0\" cellspacing=\"0\">
<td width=\"10\" valign=\"middle\" bgcolor=\"#ebebeb\" class=\"god_txt\"><img src=\"images/godkend.gif\" width=\"23\" height=\"25\"></td>
<td width=\"356\" valign=\"middle\" bgcolor=\"#ebebeb\" class=\"god_txt\"> Siden blev opdateret.</td>
</table>
</td>
</tr>
</table><br>";
}
$sql = mysql_query("SELECT * FROM udland WHERE id='1'");
$row = mysql_fetch_array($sql);
$tekst = $row['tekst'];
$id = $row['id'];
?></div></td>
</tr>
<tr>
<td class="main_txt">
<form name="redi" method="post" action="udland.php">
<table width="580" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90" valign="top" class="main_txt">Tekst:</td>
<td width="490"> </td></tr>
<tr>
<td colspan="2" valign="top" class="main_txt"><?php
include("fckeditor/fckeditor.php");
$oFCKeditor = new FCKeditor('FCKeditor1');
$oFCKeditor->BasePath = 'fckeditor/';
$oFCKeditor->Value = $tekst;
$oFCKeditor->Width = '560';
$oFCKeditor->Height = '400';
$oFCKeditor->Create();
?>
<input type="hidden" name="id" value="<?php echo $row['id']; ?>" />
<input type="hidden" name="redi2" value="redi" /></td>
</tr>
<tr>
<td colspan="2"><input name="redi" type="submit" class="ok_input" id="redi" value="Gem" /> </td>
</tr>
</table>
</form>
</td>
