Posts by karran • 41 points
2 posts
-
1
votes1
answer2284
viewsA: Error 1452 mysql: Cannot add or update a Child Row
The problem is here: ALTER TABLE produtos ADD CONSTRAINT id_fk FOREIGN KEY (id_produto) REFERENCES cart_produtos(id_produtos); With this to create a product record, you need to use an existing…
-
0
votes1
answer174
viewsA: How to replace/optimize multiple ifs in C?
Using Return to return the aux when editing successfully and -1 when an error occurs it is possible to remove the last if and some elses. int editar(aluno *alunoPtr) { aluno *tmp; int edita, aux =…