1
I need help from you. I have a small system that allows the registration of companies, and each one can contain one or more members. See a summary of the tables:
//Tabela Empresa
emp_codigo (chave primaria)
emp_nome_empresa
emp_telefone
//Tabela Associados
ass_codigo (chave primaria)
ass_empresa (chave estrangeira -> emp_codigo)
ass_nome
ass_telefone
I register companies with their due associates. I would, however, like to configure it so that, for each new registered company, the registration of their respective members start from code 1, and do not follow the standard sequence of the primary key auto increment (ass_codigo).
In this case, I thought about creating another field (ass_code 2) for the associated table, and doing this treatment manually. There is a more automatic way to do this within phpMyAdmin?
That’s right, Ronivaldo, I thought I’d create a second field for that. Since the primary key already exists (ass_code), it would create "ass_code 2", for example, which would be the associate’s "manipulable" code.
– Luis
It’s the right thing to do.
– Ronivaldo Roner
Blz, thank you Ronivaldo
– Luis