2

I am new to SQL database, and I would like to build a membership queue system. However, I do not know how to design tables, so that each time when user input and register personal data, the SQL will automatically assign a queue number for the record. Any website or reference have tutorial for that ?

Also, I am trying to build it with mobile platform, so is it good to use sqllite and parse it with JSON to the web server or use websql ?

Please help, Thank You.

1 Answer 1

2

There are two unrelated questions there. But in relation to the first part, you just need a standard auto_increment column:

CREATE TABLE `members` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `name_key` (`name`)
); 

This table will automatically assign a new id to each record as a name is inserted.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.