Welcome Guest, Not a member yet? Register   Sign In
Show album data and images in my view
#5

[eluser]Lykos22[/eluser]
Some additional information:
I've also tested the JOIN query
Code:
SELECT `albums` . * , `albumimages`.`image`
FROM `albums`
LEFT JOIN `albumimages` ON `albums`.`album_id` = `albumimages`.`album_id`
in phpmyadmin and here are the returned rows:
Code:
album_id,          title,                  description,                image
   1                 firstalbum             this is a test                  car.jpg
   1                 firstalbum             this is a test                  sailing.jpg
   2                 secondalbum        another test                 butterflies.jpg
   2                 secondalbum        another test                 dogs.jpg
So although the data return correct, when I loop through them in my view I get the same rows as above.
What I actually want to display in my view is this:
Code:
album title 1
description  1                             and here all images of 1st album

-----------------------------------------------------------------------------------
album title 2
description   2                            and here all images of 2nd album


Messages In This Thread
Show album data and images in my view - by El Forum - 12-19-2013, 06:50 AM
Show album data and images in my view - by El Forum - 12-19-2013, 10:48 AM
Show album data and images in my view - by El Forum - 12-19-2013, 10:53 AM
Show album data and images in my view - by El Forum - 12-20-2013, 12:58 AM
Show album data and images in my view - by El Forum - 12-20-2013, 03:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB