E-Yearbook Help!

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
pretty woman
Forum Newbie
Posts: 2
Joined: Tue Sep 17, 2002 3:19 am
Location: Philippines

E-Yearbook Help!

Post by pretty woman »

Hi Folk,

Am working on an electronic yearbook for our class. I am doing this with Postgresql 7.3beta1, PHP 4.2.3 and Apache 1.36. I encountered problems on how would I store my picture files on Postgres which can later be views on my e-yearbook page.
Can somebody help me on this?

Thanks a lot.

Pretty Woman :o
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

This may be of interest:
http://www.devnetwork.net/forums/viewto ... e+database

It relates to someone trying to do the same in MySQL but the theory should hold for Postgresql.

As stated in the above post you may want to consider just storing the location (a path to) the image in the database and physically storing the picture file in a folder on the server. It should make things a lot easier.

Mac
JPlush76
Forum Regular
Posts: 819
Joined: Thu Aug 01, 2002 5:42 pm
Location: Los Angeles, CA
Contact:

Post by JPlush76 »

the usual way to do it is have a form that the user can browse their hard-drive, then upload a picture to the server, then you code your page so that the file path goes into a field in your database.

I think that way is the best for keeping your database cleaner and faster.

so your field in your database would be:

images/jaypicture.jpg

instead of making it a blob like:

asl;kdfja;ldskfjadfkl;j356jk;l456
fgtylk45j6lk;456kl;45j6kl;rtjjklasjser;lkgjwerkl;tjekl;rgjkl;dsfjgl;kdsfjg3465;lkj4564567;lk567lk;567lk;rtjhjlk;jyh65jh46jhg3jhg56kjh64jkl5h6kj45h6k
fgtylk45j6lk;456kl;45j6kl;rtjjklasjser;lkgjwerkl;tjekl;rgjkl;dsfjgl;kdsfjg346
5;lkj4564567;lk567lk;567lk;rtjhjlk;jyh65jh46jhg3jhg56kjh64jkl5h6kj45h6k
fgtylk45j6lk;456kl;45j6kl;rtjjklasjser;lkgjwerkl;tjekl;rgjkl;dsfjgl;kdsfjg346
5;lkj4564567;lk567lk;567lk;rtjhjlk;jyh65jh46jhg3jhg56kjh64jkl5h6kj45h6kfgtylk45j6lk;456kl;45j6kl;rtjjklasjser;lkgjwerkl;tjekl;rgjkl;dsfjgl;kdsfjg346
5;lkj4564567;lk567lk;567lk;rtjhjlk;jyh65jh46jhg3jhg56kjh64jkl5h6kj45h6k
fgtylk45j6lk;456kl;45j6kl;rtjjklasjser;lkgjwerkl;tjekl;rgjkl;dsfjgl;kdsfjg346
5;lkj4564567;lk567lk;567lk;rtjhjlk;jyh65jh46jhg3jhg56kjh64jkl5h6kj45h6k
fgtylk45j6lk;456kl;45j6kl;rtjjklasjser;lkgjwerkl;tjekl;rgjkl;dsfjgl;kdsfjg346
5;lkj4564567;lk567lk;567lk;rtjhjlk;jyh65jh46jhg3jhg56kjh64jkl5h6kj45h6k
fgtylk45j6lk;456kl;45j6kl;rtjjklasjser;lkgjwerkl;tjekl;rgjkl;dsfjgl;kdsfjg346
5;lkj4564567;lk567lk;567lk;rtjhjlk;jyh65jh46jhg3jhg56kjh64jkl5h6kj45h6k
fgtylk45j6lk;456kl;45j6kl;rtjjklasjser;lkgjwerkl;tjekl;rgjkl;dsfjgl;kdsfjg346

5;lkj4564567;lk567lk;567lk;rtjhjlk;jyh65jh46jhg3jhg56kjh64jkl5h6kj45h6k

fgtylk45j6lk;456kl;45j6kl;rtjjklasjser;lkgjwerkl;tjekl;rgjkl;dsfjgl;kdsfjg3465;lkj4564567;lk567lk;567lk;rtjhjlk;jyh65jh46jhg3jhg56kjh64jkl5h6kj45h6k
fgtylk45j6lk;456kl;45j6kl;rtjjklasjser;lkgjwerkl;tjekl;rgjkl;dsfjgl;kdsfjg346
5;lkj4564567;lk567lk;567lk;rtjhjlk;jyh65jh46jhg3jhg56kjh64jkl5h6kj45h6k
fgtylk45j6lk;456kl;45j6kl;rtjjklasjser;lkgjwerkl;tjekl;rgjkl;dsfjgl;kdsfjg346
5;lkj4564567;lk567lk;567lk;rtjhjlk;jyh65jh46jhg3jhg56kjh64jkl5h6kj45h6k
fgtylk45j6lk;456kl;45j6kl;rtjjklasjser;lkgjwerkl;tjekl;rgjkl;dsfjgl;kdsfjg346
5;lkj4564567;lk567lk;567lk;rtjhjlk;jyh65jh46jhg3jhg56kjh64jkl5h6kj45h6k
fgtylk45j6lk;456kl;45j6kl;rtjjklasjser;lkgjwerkl;tjekl;rgjkl;dsfjgl;kdsfjg3465;lkj4564567;lk567lk;567lk;rtjhjlk;jyh65jh46jhg3jhg56kjh64jkl5h6kj45h6k
Post Reply