Jump to content

image gallery trouble! php & mySQL


ingve

Recommended Posts

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

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 :-\

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.