View Single Post
ישן 25-02-07, 16:19   # 1
LDan
Permanently Banned
 
מיני פרופיל
תאריך הצטרפות: Jan 2006
הודעות: 1,018
שלח הודעה באמצעות MSN אל LDan

LDan לא מחובר  

[php] בעיה בהכנסה למסד

שלום,
יש לי טופס ואני מכניס איתו למסד
וזה כותב לי את השגיאה הבאה (אחרי שאני שולח את הטופס)
PHP קוד:
You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near 'where ,numf ,speed ,len) VALUES ('1' , 'asd' , 'das', 'asdasda', 'das' , 'asd' ,' at line 1 
הנה החלק שמכניס למסד:
PHP קוד:
//num id
$num mysql_query("select * from `sdarot`"); 
$num mysql_num_rows($num);
if (
$num=="") {
$id=1;
} else {
$y=0;
for (
$ii=1;$ii<=$num;$ii++) {
$nuum mysql_query("select * from `sdarot` WHERE `id`= '$ii'"); 
$nuum mysql_num_rows($nuum);
if (
$nuum=="") {
$id=$ii;
$ii=999999999999;
$y=1;
}
}
if (
$y==0) {
$id=$num+1;
}
}
$addser "INSERT INTO `sdarot` (id, namehe, nameen, about, where ,numf ,speed ,len) VALUES ('$id' , '".$_POST['namehe']."' , '".$_POST['nameen']."', '".$_POST['about']."', '".$_POST['where']."' , '".$_POST['numf']."' , '".$_POST['speed']."' , '".$_POST['len']."')";
mysql_query($addser) or die (mysql_error()); 
תודה לעוזרים!
  Reply With Quote