2
Based on the tables below and passing to 'dataInicio' and 'dataFim', would it be possible with only one Select select from the Vehicle Table only vehicles that are not in the Reserve Table? I’m studying Inner Join, but I have no idea if that’s possible.
Tabela Veiculo
--------------
idVeiculo
nomeVeiculo
Tabela Reserva
--------------
idVeiculo
dataInicio
dataFim
Thank you. Follow the final logic. SELECT * FROM vehicle WHERE idVeiculo NOT IN (SELECT veiculo_idVeiculo FROM reservas WHERE dataIni BETWEEN '". $dataini." ' AND '". $datafim." ' OR dataFim BETWEEN '". $dataini." ' AND '". $datafim."');
– Will Levandoski