2
I have a client table containing ID_CLIENTE, NOME_CLIENTE and another approval table containing CLIENTE_APROVADO.
The approval table is filled with SOME clients in the client table but only the clients' NAMES. I wanted to replace the name with the client id. Or create an id_client column in the approval table. I wanted to do this in php. How can I mount this sql query ?
Would you have any chance to add the Approved Customer field to the Customers table and delete the Approval table? I see no need to have another table only for approval. What is the idea of the existence of the Approval table?
– Giancarlo Abel Giulian
Actually, you can include the approved cliente_field in the clients table and define it as a logical value.
– William Urbano
The best idea would be to create a foreign key in the table
aprovacao
and making a comparison with the names repeated, and doing an update directly at the bank, as in Levi Macedo’s reply.– Ivan Ferrer