I have the following tables
livro
id int pk
passador
id int pk
fk_livro_id int
ordem int
I'm making a book listing screen. The goal is to bring all books that are not registered in the docker
I made the following query:
SELECT * FROM livro as l JOIN passador as p ON l.id != p.fk_livro_id AND like %?%
When I have at least one book registered in the passer the search works normally, however when there is no book in the passer the search always returns empty.