我創建並編輯表中的一行,但是我在php中編輯mysql查詢給了我一個我找不到的錯誤。任何幫助?
創建查詢:
$query = "INSERT INTO timelines (
id, event_name, event_date, date_created, attendee_count, attendee_names, maximum_attendees, creator_id, creator_name, price, thumbnail
) VALUES (
'{$timelineID}', '{$event_name}', '{$event_date}', '{$date_created}', '{$attendee_count}', '{$attendee_names}', '{$maximum_attendees}', '{$creator_id}', '{$creator_name}', '{$price}', '{$thumbnail}'
)";
編輯查詢:
錯誤:
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 'WHERE id =' at line 8
我希望這些變量進行消毒並逃脫。 –
你好,小[Bobby Tables](http://bobby-tables.com/)。 – Amadan
爲什麼不先嚐試'或死(mysql_error())? –