Page 1 of 1

E-Yearbook Help!

Posted: Tue Sep 17, 2002 3:19 am
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

Posted: Tue Sep 17, 2002 3:28 am
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

Posted: Tue Sep 17, 2002 12:30 pm
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