BetaONE will rise again!

BetaONE will rise again! (http:\\b1.hcanet.com\forum/index.php)
-   Web Development (http:\\b1.hcanet.com\forum/forumdisplay.php?f=50)
-   -   Mysql Database For My Photo Album. (http:\\b1.hcanet.com\forum/showthread.php?t=9052)

SlickVic78 22nd Jul 03 02:59 PM

I've been working on my online photo/video album for the past year now. I originally had all the Main Categories/Picture Categories information witihin a single flat file (all set up within arrays). This was all fine and dandy until I wanted to start setting up sub categories (an example - a sub category for the pic category of July 4th (the sub category would branch to 2002, 2003, etc...). The site was primarily coded in Javascript and HTML. Things were getting a little hairy recently and I was about to give up. It was becoming more of a pain in the @ss to work with this now enormous flat file because I had picture captions that would appear in the picture window below the picture.

I don't want to stop my never ending project. So I thought about making a MySQL database which would be nice because I could make an admin page that could call up individual records to edit them if need be, as well as adding/deleting photos to the archive. So I decided to pick up PHP as another language. :)

I really like PHP and what it has to offer. I have a book (PHP Fast and Easy Web Development) that I've been learning from. I've gone through 2/3s of the book within 5 days. The concepts are fairly similar to other languages which makes this pretty easy to pick up.

Ok, enough rambling... Here is what I am asking help on... I never worked on a database before. I've worked through the examples in the book with no problems... But I am having issues visualizing what I need to do in order to set up an efficient database for my online photo/video album.

1) How many tables would I need?
2) Can all the info (Main Categories/Picture Categories/Sub Categories) reside in one table, or would that need to be split up.
3) What would be the link from Main Category to Sub Category (some ID?).

Any help you can provide would greatly be appreciated. Sorry for the rather long email, but I wanted to be as descriptive as possible. If more information is needed, please let me know.

Much thanks in advance! :)
-SlickVic78

Sephiroth 23rd Jul 03 03:10 AM

:huh: lol, this could be difficult

you should split your tables up, one for categories, one for pictures, one for users, etc... so things are organized better, as far as the link between categories, you could do that pretty easy through mysql

in your categories table, create an integer field, and let mysql auto increment that field, so then your query for say category a with an id of 1 would be select * from categories where id = '1';

why not use a premade php gallery?

SlickVic78 23rd Jul 03 04:00 AM

Hey Sephiroth,

Thanks for the tip! :)

Why not use a pre-made PHP gallery? Well, that's simple... Because I want to make my life much more complicated! :lol:

I always had this passion to try and do things myself. It is much more rewarding I think. If you are interested in checking out the current site (only using HTML/JavaScript/PERL (only a little of PERL), send me a PM and I'll set you up with the login info to the site. From there, you'll see exactly what I am talking about and why I asked what I did... :D

I am pretty much looking to do a code revamp - which will primarily be based on PHP and a Database. Like I said, the database is the only thing that is somewhat slowing me down from actually begining the revamp... :blink:

-SlickVic78

Sephiroth 23rd Jul 03 04:04 AM

maybe we could help each other out?

i'm trying to get a photo gallery for b1 too, but every script i've found is either buggy, doesn't work the way i want it to, doesn't have features i need it to have, or doesn't have the security i need it to have

once zone-mr gets back from vacation, maybe we could all work together and build one if he's up for it? i could do the html, css, and parts of the database, if the two of you could do the db too and the php, then we can share it, less work involved for all of us ;)

and yes, send me login info for your site :)

oh, and you might not want to mention enormous flat files to Zone, lmao, his school asked him to help with their yearbook, and I can't remember the exact size, but it was just one huge publisher file, they didn't keep anything seperate, all one flat file, and it was over a gig, lmao, on the computers at school it took 30 mins to open

well, he had to fix errors, then print it all out a few weeks ago, but every time he would start printing, it would crash with a printer error after a few pages. he ended up doing distributed printing, he had every machine in the class opening it, and by the time one of them printed a few pages and crashed, the next would have the file opened and he could print more, lmao

SlickVic78 23rd Jul 03 04:22 AM

LOL... Thank god I decided to halt with updating the album... The flat-file was getting rather rediculous! :) LMAO. :lol:

Like I said, I am rather new on the PHP scene, but I wouldn't mind adding some input/feedback/code, etc... Keep me in the loop!

You should get a PM in a few minutes with login info.

Thanks again for your help!
-SlickVic78


All times are GMT +1. The time now is 06:14 AM.

Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.