0
I have an sql query that lists two tables:
register and release.
I have an application that adds the "id" of "registration" in the "release" table, i intend to display only the results that DO NOT exist in the table "release".
follow the consultation:
$verifica = $db->prepare("SELECT liberar.aluno AS alunoID, liberar.title, cadastro.nome AS name, cadastro.id AS idAluno FROM cadastro INNER JOIN liberar ON (cadastro.id = liberar.aluno) WHERE liberar.title = ? GROUP BY cadastro.nome ORDER BY cadastro.nome");
$verifica->execute(array($identificador));
This $identifier variable is the title I captured by GET. this query returns the ids that were added in release, but I want to return the ones that are not added only.
I already tried to change (registration.id != release.student) but so it returns me all id, I need to return only the ids that were sent to release..
that solved, thank you! I posted the adaptation of my code.
– José Roberto Juliana