I am doing a query using INNER JOIN
, but when I do the JOIN
in the A
table with the B
and there is no id in the B
table, it returns me an array
empty. I would like it if it did not find the id in the B
table to return the A
table anyway or both but with the blank fields in the B
table. I'm using the following code:
SELECT *
FROM projects AS p
INNER JOIN project_images AS img ON p.id = img.project_id
WHERE p.id = 44
LIMIT 1