-2
It occurred to me to try to do this action, but it seems to give error. It is possible?
//EVITANDO DUPLICIDADE
if ($legenda > "0") {
SELECT legenda FROM aula_upload_arquivo WHERE legenda = $legenda;
echo 'Existe esse arquivo';
} else {
echo 'Não existe o arquivo';
}
Hi, Leandro. Sorry, I forgot to mention. I use the PDO system. I couldn’t fit your answer to test. And I don’t know how to turn from msqli to Pdo. :-(
– Tátto
Bacco, Why do not you take Advantage of it and Answer the Question? An IF loop was made with an MSQLI Response and Accurate in PDO. Another Question, about CLASSES, IF, INSERT and also no Answer. Why not help, Instead of Hinder?
– Tátto
@Bacco, read this not Please
– Tátto
@Tátto the response of Inkeliz does not work as desired? It is the same with PDO.
– NoobSaibot
@Noobsaibot, thank you for helping me. It didn’t work out. Because like all my system is in PDO, when I put the application with msqli ended up giving conflict, because it has the UPLOAD system CLASS that locks many actions that are made within the code.
– Tátto
Noobsaibot, I followed what @Bacco said and changed the system to the field: "identifies" as UNIQUE. Got show, really no more to duplicate, but, generated me another problem, because, as has the CLASS in Upload, appear some errors. I’ll put them in the next comment.
– Tátto
In the first insertion of the field "identifies", beauty, register normally, but in the second comes this error, by the way, these errors:
– Tátto
I can’t post my mistakes here...
– Tátto
How to insert errors here?
– Tátto
You can edit the question.
– NoobSaibot