View Single Post
ישן 23-02-06, 14:14   # 5
שקד
משתמש - היכל התהילה
 
מיני פרופיל
תאריך הצטרפות: Dec 2005
מיקום: ירושלים
גיל: 39
הודעות: 659

שקד לא מחובר  

ציטוט:
נכתב במקור על ידי Pip
מה אתה מנסה לעשות פה? לשנות נתונים או להכניס נתונים חדשים?
אם נתונים חדשים:

PHP קוד:
$sql "INSERT INTO `books`  (`bookname`, `reporter`, `maf`, `about`) VALUES ('$bookname' , '$reporter' , '$maf', '$about')";
mysql_query($sql) or die(mysql_error()); 
ואם עדכון נתונים:


PHP קוד:
$sql "UPDATE  books SET  `bookname`='$bookname'  and `reporter`='$reporter'  and `maf`='$maf' and `about`='$about'";
mysql_query($sql) or die(mysql_error()) 
רק לגבי זה אני לא בטוח אם צריך את הand או לא.
או הכי טוב לעשות ככה
PHP קוד:
$sql mysql_query("INSERT INTO `books` (bookname,reporter,maf,about) VALUES
('$bookname','$reporter','$maf','$about')"
) or die (mysql_error()); 
__________________
  Reply With Quote