I would like a user to register a single limit of markers on the map

Asked

Viewed 36 times

0

Good morning guys, I would like to know, if I have how to determine a maximum limit of markers registrations there is a user depending on their level of access in the database. Example:

CREATE TABLE tb_users (

id_users int(11) NOT NULL AUTO_INCREMENT,

email varchar(50) NOT NULL,

usuario varchar(20) NOT NULL,

senha varchar(15) NOT NULL,

nome varchar(35) NOT NULL,

telefone varchar(15) NOT NULL,

status varchar(10) NOT NULL,

pagseguro varchar(20) DEFAULT NULL,

PRIMARY KEY (id_users)

)

In the table above, if the user had level 2 access in the column pay-off, he could then enter 4 markers on the map. Anyway, I want to know how I put this limit to the user??

  • This rule has to be dealt with in the application and not in the bank.

1 answer

0

At first as a single limit of markers. the ratio would be 1 to 1 for another table with reference to pay insurance; only dependency q noticed for the indication of the quantity, normalizing. inserir a descrição da imagem aqui

however, note that it is a varchar as a primary key; I would recommend another pay-safe table, containing id_pagseguro, a field with description, and the amount of markers ...; thus would reference an integerinserir a descrição da imagem aqui.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.