[Help]Php/mysql

pranay007

New member
Joined
Mar 29, 2013
Messages
1
Points
0
I Know Basic Php/mysql

I Want To Know How To Store Photo Albums In database

ex:- i want to create daily new albums in my website..so that people can download it
 

Inquestor

Well-known member
Joined
Feb 1, 2013
Messages
495
Points
63
Alright,

So, I have gave this some thought, You could want to do the following. I do believe it will get you on the right track anyway.

1) You want to the an album as a category. Create an SQL table called "albums" with the following columns (id, name). Then create a second table called "images" (I do not know how much info you want to store ie, user who uploaded, size of image, moderated/approved etc...) As an example create the following columns (id, album, url)

"album" would store the (album id). This way we can create PHP MySQL query like so ("SELECT * FROM images WHERE album=12 ORDER BY id DESC").

Now that was a easy part, now for the PHP.

1) I would create a little script that inserts each day into albums tables (After script is created set it up as CRON JOB every day at zero hour)

2) Create image upload system in PHP

3) Using PHP's ZIP extension, zip up all images after day is over, store link into albums table (create another column called 'zip') This will hold the path to each album zip file in tmp directory or where ever.

4) Call out all variables you desire.

5) There we go

This is just the basic jist to it, If you require more assistance, PM me your code (files). I will see If I can be more help.
 
Last edited:
Older threads
Replies
4
Views
3,106
Replies
3
Views
3,541
Replies
3
Views
20,984
Replies
0
Views
2,166
Newer threads
Replies
0
Views
2,717
Replies
2
Views
2,351
Replies
4
Views
2,829
Replies
2
Views
3,678
Latest threads
Replies
0
Views
28
Replies
0
Views
30
Replies
1
Views
39
Replies
3
Views
94
Recommended threads
Similar threads
Replies
3
Views
125
Replies
1
Views
167
Replies
13
Views
495
Top