2
I need to select all records from the table solicitation where all the table records tasks that have in the column id_solicitation the id concerning that request, and date of completion are different from 0000-00-00.
It would be more or less the following:
SELECT * FROM solicitacoes_solicitacao WHERE (SELECT * FROM solicitacoes_tarefas WHERE id_solicitacao = $id_da_solicitacao AND dataconclusao != 0000-00-00"
I already use the 2 Sqls separately, one to list the requests and another to list the tasks of a request where the completion date is different from 0000-00-00, but I need to use the two together now. I don’t know if that would be it, but I did a search and it would be using a clause called INNER JOIN, I read it but I didn’t quite understand it...
If anyone can solve my problem I appreciate!
See this article, will clarify : https://www.devmedia.com.br/sql-join-understandhow to function
– Thalles Rangel