I have the following table structure:
Category
-------------------
id
slug
values
category
sort
Incidents
-------------------
id
scid
title
impact
date
servicestatus
incidentsstatus
details
createdon
editedon
In in incidents table we have multiple entries for a single category. scid is the category id which is given in table category (id)
I want to show all the category names with the value of servicestatus field from incidents table.
Kind of
Service Status
------- ----------
Internet 1
Email 0
Server1 1
Please check and advise what we can do with it, I tried it with join between both table on the basic of category.id and insidents.scid but that is showing duplicate results?
Thanks!