הDB שלי מורכב ככה:
-טבלה שנקראת homework ובה השדות date, class, todate, alldate
-טבלה שנקראת hmlock ובה השדות lock וday
השאילתות הם כאלה:
PHP קוד:
mysql_query ("INSERT INTO `homework` (date, class, todate, alldate) VALUES ('$DT', '$class', '$todate', '$AD')");
{במקרה של לחיצה על כפתור אישור (בconfirm), הדף מופנה לכתובת GET ואז מתבצעת השאילתה}
PHP קוד:
mysql_query ("INSERT INTO `hmlock` (lock, day) VALUES ('true', '$DT')") or die(mysql_error());
{במקרה של לחיצה על כפתור ביטול, הדף מופנה לכתובת GET אחרת ואז מתבצעת השאילתה}
הבעיה היא- השאילתה הראשונה פועלת פיקס.
השנייה נותנת לי שגיאה בנוסח הבא:
ציטוט:
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 'lock, day) VALUES ('true', '20060223')' at line 1
|
עזרה?