在PHP和MYSQL中爲類創建數據庫。創建數據庫時遇到錯誤,phpMyAdmin給我一個無用的錯誤消息。 (軟件,給出了一個更好的錯誤消息將是真棒BTW)MySQL在phpMyAdmin上創建表錯誤
phpMyAdmin的錯誤:
#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 'CREATE TABLE customers (customer_id INT UNSIGNED NOT NULL auto increment, fir' at line 1
USE isys288_gottfrk
CREATE TABLE customers (customer_id INT UNSIGNED NOT NULL
auto increment, first_name carchar(20) NOT NULL, last_name VARCHAR(40) NOT NULL,
PRIMARY KEY (customer_id), INDEX full_name (last_name, first_name)) engine =
innodb;
'USE isys288_gottfrk'後面忘了分號。用'varchar(20)'替換'first_name'後面的'carchar(20)'' – Sal00m