Add AUTOINCREMENT to primary keys

ñ
This commit is contained in:
posweg 2020-05-21 20:21:44 +00:00
parent 8d73b5d80f
commit 92c6bea0fb
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ session_start();
$db = new SQLite3('ask.db');
$users_table = $db->query("CREATE TABLE IF NOT EXISTS users(
id INTEGER PRIMARY KEY,
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT,
shadow TEXT,
name TEXT,
@ -13,7 +13,7 @@ $users_table = $db->query("CREATE TABLE IF NOT EXISTS users(
)");
$db->exec("CREATE TABLE IF NOT EXISTS questions(
id INTEGER PRIMARY KEY,
id INTEGER PRIMARY KEY AUTOINCREMENT,
user INTEGER,
by INTEGER,
question TEXT,