SELECT * FROM `product` left join category on product.category_id = category.id
This query works fine. But the problem is, both the product table a
Use aliases with the AS keyword:
AS
SELECT p.id AS product_id, p.name AS product_name, c.id AS cat_id, c.name AS cat_name FROM `product` AS p LEFT JOIN category AS c ON p.category_id = c.id