SQLite的新手,所以我不知道我在做什麼錯。我只是得到一個錯誤說:我的SQLite語法錯誤
SQLSTATE[HY000]: General error: 1 near "CREATE": syntax error
這裏是我的SQL:
CREATE TABLE users (
id INTEGER NOT NULL PRIMARY KEY,
date_created DATETIME NOT NULL,
date_updated DATETIME NOT NULL,
username VARCHAR(32) NOT NULL,
password VARCHAR(32) NOT NULL,
role VARCHAR(32) NOT NULL DEFAULT 'member',
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
email VARCHAR(128) NOT NULL
)
CREATE TABLE subscribers (
id INTEGER NOT NULL PRIMARY KEY,
name VARCHAR(40) DEFAULT NULL,
email VARCHAR(255) NOT NULL UNIQUE
)
CREATE TABLE weekly_download (
id INTEGER NOT NULL PRIMARY KEY,
filename TEXT NOT NULL,
download_date DATE NOT NULL,
body TEXT
)