2
How to insert in the table if there is no record, as for example there is the table turma_materia, has the following information:
+----+-------+---------+
| ID | turma | materia |
+----+-------+---------+
| 1 | 1 | 1 |
| 2 | 1 | 2 |
| 3 | 2 | 2 |
If you try to insert Class 1 with Class 1, it will check if you have, if you do not have Index, if you do not have it
It worked, thank you very much
– Daniel Alencar Souza
Better would be a UNIQUE index, no?
– Bacco
@Bacco opa, had not seen the comment. I saw now the other reply, thank you, I will give a
UP
there. Really would be the best solution– Sorack