ingve Posted July 2, 2008 Share Posted July 2, 2008 Hello people! I have a bit of a problem on my hands.. I am trying to bulid my own gallery for my bands webpage, using mySQL tables for storage of image info and a folder for storage of the actual images.. And I want to be able to retrieve the images as sets: if two or more images has the same title, the title should be displayed only once, with all the images shown below.. And this repeated for each new image title. ( The title of the image is stored as a separate field in the mysql table, and the image name connected to the folder on my server in another field. ) Can anyone help? If I haven't explained myself good enough, please write a note about it and I will try to explain further.. Link to comment https://forums.phpfreaks.com/topic/112997-image-gallery-trouble-php-mysql/ Share on other sites More sharing options...
trq Posted July 2, 2008 Share Posted July 2, 2008 Where exactly are you stuck? Have you got any code? Link to comment https://forums.phpfreaks.com/topic/112997-image-gallery-trouble-php-mysql/#findComment-580456 Share on other sites More sharing options...
DarkWater Posted July 2, 2008 Share Posted July 2, 2008 I'd make an album table and an image section so you can easily associate images with a certain "album" or "grouping". Link to comment https://forums.phpfreaks.com/topic/112997-image-gallery-trouble-php-mysql/#findComment-580457 Share on other sites More sharing options...
ingve Posted July 3, 2008 Author Share Posted July 3, 2008 I get stuck when I try to retrieve the image info from the mySQL table. while ($img = mysql_fetch_array($feedback) ) { $title = $img["title"]; // this is the image title stored in the table $img = $img["img"]; // this is the image information stored in the table, which is connected to the image folder on the server //Here I need some sort of loop that detects the title of the previous image. If the title of the second image is equal to the first image // then only the $img variable should be displayed.. } You can see an example of how my image gallery looks like here: http://www.bully-music.com/main.php?menu=media&media=images DarkWater: Do you have any suggestions for a query on the album table and image section idea? thanks a hundred, guys.. sorry if my english is a bit rusted, I am norwegian :-\ Link to comment https://forums.phpfreaks.com/topic/112997-image-gallery-trouble-php-mysql/#findComment-580738 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.