I have a table name tblnetworkstatus and I have 11 columns
I am getting id in affected_server and affected_service which I am storing in my DB, now I have three situations
- Either both affected_server and affected_service has been selected
- Only affected_server is selected
- Only affected_service is selected
I am getting the name of affected_server and affected_service from tblserver and tblproducts respectively using join on three tables tblnetworkstatus,tblserver and tblproduct I already have the following query got from here
SELECT m.issue_name ,m.issue_type , m.priority ,m.status,m.description , m.start_date,m.end_date,m.duration, s.name as server_name,p.name as product_name from mod_networkstatus as m LEFT JOIN tblservers as s ON m.affected_server=s.id LEFT JOIN tblproducts as p ON m.affected_service=p.id
But If I have multiple id's of affected_server and affected_service like I am storing 1,2,3,4 in a single column affected_server or affected_service then how can I do that?