Hi i am trying to fetch data from two tables(products and issues) in PHP and MySQL.
In issues table there is a column status which have four different values. The thing I want to do is to display status values in four different column for each product something like below:
S.No Product Name Status Val1 Status Val2 Status Val2 Status Val4
I am using below using below query
SELECT i.product_id, i.status, COUNT( * ) AS count FROM issues i
INNER JOIN products p ON i.product_id = p.id
GROUP BY `product_id`
'product_id'Those look like the wrong quotes to me.