I have a sql query that lists two tables:
Register and release.
I have an application that adds the "id" of "register" in the "release" table, I want to display only the results that do NOT exist in the "unpin" table.
follow the query:
$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 that I get for GET. this query returns me the ids that were added in releasing, however I want to return the ones that are not added only.
I have tried to change (cadastro.id! = release.aluno) but so it returns me all the id, I need to return only the ids that were sent to release ..