silly question, how do i join 2 tables like this
table1
-------------
id pagetitle
1 x
2 y
3 z
-------------
table2
------------
id contentid value
1 1 img.jpg
2 1 someval
3 1 someval2
4 2 x
5 3 y
RESULTS SHOULD BE ONE BIG TABLE
-----------------------------------------------------------------------------
id pagetitle id(idfrom table2...) contentid value1 value2 value3
1 x 1 1 img.jpg someval someval2
2 y 4 2 x
3 z 5 3 y
-----------------------------------------------------------------------------
interested in getting all 3 or more values for each row, no duplicates
I TRIED This portion of code in my query(example), but i get duplicated row for each value found in the table2:
SELECT * FROM `table1` AS t1
INNER JOIN `table2` AS t2
ON t1.id = t2.contentid
thanks