各位大大 作業二 我在phpmyadmin 內的 mysql 創了 表單:articles id (INT) title (VARCHAR,255) body (TEXT) created_at (TIMESTAMP) INSERT資料 的語法 INSERT INTO `articles`(`id`, `title`, `body`, `created_at`) VALUES ([1],["hello"],["hello"],["2017-9-17"]) error message #1064 - 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 '[1],["hello"],["hello"],["2017-9-17"])' at line 1 但是一直報錯,查了很多教學 看不出自己哪邊打錯 為什麼無法新增資料進去 ,請求版上大大替我解惑一下....感恩 如果有需要補充的資料 留言我會馬上補上
INSERT INTO `articles`(`id`, `title`, `body`, `created_at`) VALUES ([1],["hello"],["hello"],["2017-9-17"]) 我把括弧 [ ] 拿掉就可以了 INSERT INTO `articles`(`id`, `title`, `body`, `created_at`) VALUES (1,"hello","hello","2017-9-17")