anticore Posted March 8, 2006 Share Posted March 8, 2006 i'm trying to create a simple gallery for my site. and i'm not sure on how to go about it.i'm designing my mysql table to look likeid,name,year,yearsection,description,image1,image2,image3,image4,thumbnailyearsection is so that i can call all the images within year catagories i have already definedand the imageX are to store the locations of the images. i'm thinking i'm going to need a couple functionsa listing function to list according to my year catagories showing a thumbnail and just a namea id function to load whatever image/name is chosen on the listing page with the describtion and images and an add/delete/modify. Is there something i'm forgetting? or is there a better way of doing this Link to comment https://forums.phpfreaks.com/topic/4458-creating-simple-image-gallery/ Share on other sites More sharing options...
keeB Posted March 8, 2006 Share Posted March 8, 2006 [!--quoteo(post=352937:date=Mar 8 2006, 07:09 PM:name=anticore)--][div class=\'quotetop\']QUOTE(anticore @ Mar 8 2006, 07:09 PM) [snapback]352937[/snapback][/div][div class=\'quotemain\'][!--quotec--]i'm trying to create a simple gallery for my site. and i'm not sure on how to go about it.i'm designing my mysql table to look likeid,name,year,yearsection,description,image1,image2,image3,image4,thumbnailyearsection is so that i can call all the images within year catagories i have already definedand the imageX are to store the locations of the images. i'm thinking i'm going to need a couple functionsa listing function to list according to my year catagories showing a thumbnail and just a namea id function to load whatever image/name is chosen on the listing page with the describtion and images and an add/delete/modify. Is there something i'm forgetting? or is there a better way of doing this[/quote]Maybe it's the complicated part of me, but I would definately seperate this into at least a few tables and join them based on the data you need. What are the image1-4 for? wouldn't it just be 1 source image, grouped together by category, year, event? something along those lines?I think you have a good general idea, but it needs to be expanded a little bit ;) Link to comment https://forums.phpfreaks.com/topic/4458-creating-simple-image-gallery/#findComment-15490 Share on other sites More sharing options...
anticore Posted March 8, 2006 Author Share Posted March 8, 2006 image 1-4 are for inputing the locations of the images.the listing part of this will only show the thumbnail followed by the owner/name clicking on it will bring up a description followed by 4 pictures.should i just upload the images to the table? would that be complicated? Link to comment https://forums.phpfreaks.com/topic/4458-creating-simple-image-gallery/#findComment-15523 Share on other sites More sharing options...
keeB Posted March 8, 2006 Share Posted March 8, 2006 [!--quoteo(post=352984:date=Mar 8 2006, 09:02 PM:name=anticore)--][div class=\'quotetop\']QUOTE(anticore @ Mar 8 2006, 09:02 PM) [snapback]352984[/snapback][/div][div class=\'quotemain\'][!--quotec--]image 1-4 are for inputing the locations of the images.the listing part of this will only show the thumbnail followed by the owner/name clicking on it will bring up a description followed by 4 pictures.should i just upload the images to the table? would that be complicated?[/quote]So 1 thumbnail, 4 pictures?You see the problem with this right? You'll never be able to expand nicely, if, say, you want 5 pictues, and it's actually LESS work to make it expansive.Take this layout for example...table thumbnailstable imagesif you make thumbnails and images relational.. meaning they both have 1 field which can associate each other with one another.. then you can have multiple images per thumbnail. make sense?Take this hypothetical query:[code]select * from thumbnails tninner join images i on i.thumbnailid = tn.idwhere tn.id = 2[/code]I hope that makes a bit of sense, I can elaborate more if needed ;) Link to comment https://forums.phpfreaks.com/topic/4458-creating-simple-image-gallery/#findComment-15562 Share on other sites More sharing options...
anticore Posted March 10, 2006 Author Share Posted March 10, 2006 I dont want to make a thumbnail for each image. I am going to use the 'thumbnail' image for the listing page.lets say someone chooses the 1993-1998 catagoryI want to have the list of the corresponding user 'rides' to come upShowing|ThumbnailImage| - User's Name (a link to show the cars details and images)|ThumbnailImage| - User's Name (a link to show the cars details and images)|ThumbnailImage| - User's Name (a link to show the cars details and images)and so on. Link to comment https://forums.phpfreaks.com/topic/4458-creating-simple-image-gallery/#findComment-16214 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.