如何使用自动增量列时,使用PHP文本数据库API


How to use auto increment columns when using PHP Text DB API?

我正在使用这个php文本数据库api从这里,我有麻烦与自动增量列。我已经创建了一个数据库和一个表,我可以使用

成功地插入其中
$db->executeQuery("CREATE TABLE people (id inc DEFAULT 0, phone_number int)");
$db->executeQuery("INSERT INTO people VALUES (0, '123')");

但是每次插入时,它说id列是0。我怎样才能让它在每次插入时自动增加1 ?

请尝试:

$db->executeQuery("CREATE TABLE people (id INT NOT NULL AUTO_INCREMENT, phone_number int)");
$db->executeQuery("INSERT INTO people VALUES ( '123')");