Guys i am facing difficulity to joining two tables.
1st table Name dieases having fields
id
name
description
2nd table is combinations having fields
id
title
dieases_id
Now i want to join these 2 tables but my problem is at dieases_id field ids are stored with comma seprated Like
Row 1
id = 1 title = Something And dieases_id = 1,2
Row 2
id = 1 title = Something And dieases_id = 1,2,3
Row 3
id = 1 title = Something And dieases_id = 1,2,4
How can i join them in laravel i want to show combinations with dieases name ? Help needed
I Make a query and its working fine can any one tell me how can i convert this query to laravel 5
SELECT a.id,GROUP_CONCAT(b.name ORDER BY b.id) DieasesName FROM combinations a INNER JOIN diseases b ON FIND_IN_SET(b.id, a.dieases_id) > 0 GROUP BY a.id
@bobbybouwmann can you help me to make this query in laravel
SELECT a.id,GROUP_CONCAT(b.name ORDER BY b.id) DieasesName FROM combinations a INNER JOIN diseases b ON FIND_IN_SET(b.id, a.dieases_id) > 0 GROUP BY a.id
Now please don't mention me on every question. Someone will reply on your question when they have the knowledge and the time! You are lucky I'm online right now