I have some related tables, to do a SELECT
brings me all the normal info and INNER JOIN
, but there is a table of tickets that I have, I'm doing INNER JOIN
, now when I go to detail a vehicle, the info that normally brings me is only shown when I have a ticket registered, and the vehicles that do not have a ticket do not bring me anything, I made a var_dump
and it comes empty unless that vehicle had at least one ticket registered if it brings me all the information.
SELECT * FROM vehiculos
INNER JOIN boletas ON vehiculos.control = boletas.control
WHERE vehiculos.control = :control
If I remove the INNER JOIN
then if it brings me back all the info, but of course it already throws me error where I was showing the information of the tickets.