[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,031
Replies
3
Views
3,483
Replies
3
Views
20,909
Replies
0
Views
2,113
Newer threads
Replies
0
Views
2,670
Replies
2
Views
2,294
Replies
4
Views
2,761
Replies
2
Views
3,584
Recommended threads

Latest postsNew threads

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top