此查询有什么问题?
$query = 'CREATE TABLE book (
book_id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
book_name VARCHAR(100) NOT NULL,
book_type TINYINT NOT NULL DEFAULT 0 KEY,
book_year SMALLINT UNSIGNED NOT NULL DEFAULT 0 KEY,
book_author INTEGER UNSIGNED NOT NULL DEFAULT 0
)
CREATE TABLE author (
author_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
author_name VARCHAR(255) NOT NULL
)
CREATE TABLE book_category (
book_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
book_label VARCHAR(100) NOT NULL
)
CREATE TABLE book_review (
review_id INTEGER UNSIGNED NOT NULL KEY,
review_name VARCHAR(255) NOT NULL,
review_date DATE NOT NULL,
review_comment VARCHAR(225) NOT NULL,
review_ratting TINYINT UNSIGNED NOT NULL DEFAULT 0
)
ENGINE=MyISAM';
您的SQL语法有错误;检查与您的MariaDB服务器版本相对应的手册,以获取在'CREATE TABLE author(author_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRI'在第8行附近)附近使用的正确语法