How to db_insert into users?
The users table doesn't have an auto-increment constraint on the primary key (or any field). 

The recommended way to add users is using the API (user_save() etc), that will handle the ID for you. 

Failing that, just query for the maximum ID in the table before you perform the insert; after the first insert, assuming you have exclusivity on this database while you're developing, you can maintain the increment in your code (no need to check the table each time).

Drupal does exactly the same thing in user_save():

$account-&gt;uid = db_next_id(db_query('SELECT MAX(uid) FROM {users}')-&gt;fetchField());