[Help]Php/mysql

pranay007

New member
Registered
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
Registered
Joined
Feb 1, 2013
Messages
215
Points
0
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
6
Views
3,613
Replies
0
Views
2,107
Replies
3
Views
2,424
Replies
2
Views
2,389
Replies
17
Views
8,712
Newer Threads
Replies
0
Views
2,796
Replies
2
Views
3,352
Replies
0
Views
2,353
Replies
0
Views
2,340
Replies
1
Views
2,518
Latest Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

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