下面是該查詢:錯誤後1列的MySQL UPDATE語法
UPDATE clubs WHERE clubId = $clubId SET (name='$name', category = '$category', 'description' = '$description', president = '$president', email = '$email', phone = $phone', treasurer = $treasurer', treasurerEmail = $treasurerEmail',treasurerPhone = $treasurerPhone', advisor = '$advisor', advisorEmail = '$advisorEmail', projectCode = '$projectCode', rollover = $rollover)"
,當我嘗試我得到這個錯誤並運行它:在更新俱樂部 發生錯誤「}您的SQL錯誤語法;檢查對應於您的MySQL服務器版本的手冊,以便在第1行WHERE clubId = 1 SET(name ='Radio',category ='Media','descri')附近使用正確的語法
任何想法?
WHERE子句來___after___ SET值的列表(你不需要在你的SET列名/值括號) –
SQL沒有,但它應該有WHERE之前設置。意外拋出WHERE子句是破壞性的,但如果它只是返回一個語法錯誤,則不會。 – Popnoodles