necken18 Posted January 24, 2011 Share Posted January 24, 2011 Hello. I've got two tables one that contains general information and one that contains links. example: Table: general id, name, date Table: links id, objekt_id, link, title i wan't to loop out these tables together and put all links with the same objekt_id in one field-array. (links.objekt_id matches general.id). SELECT g.name, g.date, link.link FROM general g INNER JOIN link links ON link.objekt_id = g.id WHERE g.id = 10 There is multiplie links on every objekt_id. How can i put all of them in one field? Link to comment https://forums.phpfreaks.com/topic/225489-put-all-results-with-same-id-in-one-field/ Share on other sites More sharing options...
Muddy_Funster Posted January 25, 2011 Share Posted January 25, 2011 read up on SELECT CONCAT() - that should get you what you need. Link to comment https://forums.phpfreaks.com/topic/225489-put-all-results-with-same-id-in-one-field/#findComment-1164788 Share on other sites More sharing options...
fenway Posted January 26, 2011 Share Posted January 26, 2011 Also, PHP will do this much better. Link to comment https://forums.phpfreaks.com/topic/225489-put-all-results-with-same-id-in-one-field/#findComment-1165691 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.