Xxx Photos In Album..
making a photo album (dreamweaver8 - PHP & MySQL)
On the page (with repeated region) that's displaying all the available albums (gallery.php), I would like to include the amount of photos each album contains.. however, it doesn't seem to work out..
I have 1 recordset/query for the albums-info (id, album, summary, date-added, and display-thumb), and I tried creating another query for the photos: selecting the photo-id, photo, and album-id (filtering on album-id)... but nothing...
I get either "5" photos for each album (which is actually the amount of albums), or "0"...
Thanks for any info on how to construct my query in order to display the amount of photos belonging to that certain album (album-id)..
View Complete Forum Thread with Replies
Related Forum Messages:
Hosting Photo Album
I am writing a database for an online photo album website which will allow people to sign in, upload photos, and have an online photo album. I am trying to figure out the best design for this type of application, and I am not sure how to best set up each persons picture database. I suppose there can be a table with a list of all of the people, and then a table with all of their information that is linked to the list of people..does that sound right? Also, does a primary key need to be the same for each table that is related to each other? (Silly question, I know.)
View Replies !
Suggestions On DB Setup For A Photo Album
At the moment the site is just used by me, in time I might open it up to friends to use too. So I want to develop a DB that works now and doesn't need to be modified for the future upgrade if it happens. I'd like to have it so when when you go to the photo sections it shows the albums, represented by a single picture from that album. When you click that picture it goes to a new page that shows the pictures for the album. Should I make two tables, albums and images or just one images and have a way to find out which ones are the main image for albums and which pics belong to them?
View Replies !
Photos?
I use the browse button in an element in a form in order to upload an image to a mysql database so as far as I understand it the path is all that is stored into the database. How do I make it so that once the user tries to submit the form it checks to see if the images are in jpg, gif or jpeg format, if thats true, then the images are reduced to a width of at least 300 pixels and stored in a seperate folder?
View Replies !
Photos Comments
This is one of those php/mysql questions that could be placed in either forum, here is the original post in the php forums: Basically I currently have one row for each image and I want to add fields for user comments as needed, Comment1, Comment2 etc, CommentX gets created if no current empty comment field exists. I only expect max 10 comments per photo. I am now wondering if I should just create a separate "comments" table and have a row per comment and group by "Photo_Thumbname".
View Replies !
Map Friends And Retrieve The Photos They Can See
I am planning to implement a social network in php. it will have nothing but friends and photos. So, a user can have friends and each photo is marked private or public. those marked private can be viewed by friends only. So, say user X is not a friend of user Y, I need to first check if he is a friend. Then, retrieve the list of photos for Y and check each photo if it is private or public. Any basic info on what would be the optimal way to implement this ? Currently I have a users table, a photos table and a user_friend table. I do simple select and inner joins to retrieve what I need. Is there a better way to retrieve what each user is allowed to see on the other user's profile page ?
View Replies !
Upload Maximum Photos
I'm currently building a site where my members can upload their photos. I want my members to be able to upload a maximum of 100 photos a day. What I am planning to do is the following: - create a field "counter" in the table "members" - when this field reaches 100, no more upload is possible - create a script that runs through cronjob that will automatically set all counter to zero at the beginning of the day (00:01 AM). But what if the script doesn't get runned? Then members can't upload their photos.
View Replies !
Return Only 3 Photos From 3 Specified Galleries In One Query (was "Is It Possible?")
Let me start from the beginning.... I have a table that lists photo details, with a foreign key to link them to a gallery. Lets say I have 20 photos altogether and 4 galleries, (for simplicity sake, 5 photos per gallery). My question is: Is it possible to query the table to get it to return only 3 photos from 3 specified galleries in one query? (So returning 9 photos altogether, 3 from each gallery) Rather than querying the table 3 times with a limit of 3 and merging the results.
View Replies !
|