For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > May 2005 > good php tutorial on placing images in mysql db on the net?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author good php tutorial on placing images in mysql db on the net?
naft

2005-05-23, 3:56 pm

i am looking for a good tutorial on how to place (links to) images in a
mysql database.
anyone a good address?
my major problem is finding out what the url of the db is, in order to have
correct paths to the image to put in the db
thanks


Norman Peelman

2005-05-24, 3:56 am

"naft" <xman(removespa-m-)@naft(removespa-m-).be> wrote in message
news:Tplke.99074$HH1.5647396@phobos.telenet-ops.be...
> i am looking for a good tutorial on how to place (links to) images in a
> mysql database.
> anyone a good address?
> my major problem is finding out what the url of the db is, in order to

have
> correct paths to the image to put in the db
> thanks
>
>


You are looking in the wrong direction... there is not a 'URL' for paths
to the images in the database. You have to first store the images in the
database, then write a script that will retrieve the desired image when
requested. What is your knowledge of PHP and databases?

Norm
--
FREE Avatar hosting at www.easyavatar.com


laptop

2005-05-24, 8:56 am

<snip>first store the images in the database<snip>

Why? why not just upload all images to the same (set of) directories and
(simultaneously) store the filename and any other relevant information?

My question sounds rhetorical but it isn't. I'd genuinely like to know the
pros and cons of the method naft (kind of describes). Does it make a
difference if images are being uploaded over the Web rather than directly by
the database administrator? Also, does anyone know of a decent tutorial on
setting up a site of the kind that I describe?

thanks


"Norman Peelman" <npeelman@cfl.rr.com> wrote in message
news:_fuke.66531$IO.34728@tornado.tampabay.rr.com...
> "naft" <xman(removespa-m-)@naft(removespa-m-).be> wrote in message
> news:Tplke.99074$HH1.5647396@phobos.telenet-ops.be...
> have
>
> You are looking in the wrong direction... there is not a 'URL' for paths
> to the images in the database. You have to first store the images in the
> database, then write a script that will retrieve the desired image when
> requested. What is your knowledge of PHP and databases?
>
> Norm
> --
> FREE Avatar hosting at www.easyavatar.com
>
>



bigcloud@gmail.com

2005-05-24, 8:56 pm

The most reliable and efficient way of managing images with a database
is to uplaod the file to a designated directory and store the file
information in the database. Storing files in databases is not
reccomeded at all; due to the numerous reasons.

PHP.NET is the best place to start.
Look into the 'move_uploaded_file()' function.

laptop wrote:
> <snip>first store the images in the database<snip>
>
> Why? why not just upload all images to the same (set of) directories

and
> (simultaneously) store the filename and any other relevant

information?
>
> My question sounds rhetorical but it isn't. I'd genuinely like to

know the
> pros and cons of the method naft (kind of describes). Does it make a
> difference if images are being uploaded over the Web rather than

directly by
> the database administrator? Also, does anyone know of a decent

tutorial on[color=darkred]
> setting up a site of the kind that I describe?
>
> thanks
>
>
> "Norman Peelman" <npeelman@cfl.rr.com> wrote in message
> news:_fuke.66531$IO.34728@tornado.tampabay.rr.com...
in a[color=darkred]
order to[color=darkred]
paths[color=darkred]
in the[color=darkred]
when[color=darkred]

naft

2005-05-25, 8:56 pm

when storing the file information in the database, how do i know the
relative path, in other words, in what directory is the database located? (i
am new with databases). does it have an extension?


my provider gives me a db which i can control via a control panel in php my
admin, no problem. and an ftp account. no problem. but how to find out where
the db is located on the ftp account.

<bigcloud@gmail.com> wrote in message
news:1116959936.766016.34510@g49g2000cwa.googlegroups.com...
> The most reliable and efficient way of managing images with a database
> is to uplaod the file to a designated directory and store the file
> information in the database. Storing files in databases is not
> reccomeded at all; due to the numerous reasons.
>
> PHP.NET is the best place to start.
> Look into the 'move_uploaded_file()' function.
>
> laptop wrote:
> and
> information?
> know the
> directly by
> tutorial on
> in a
> order to
> paths
> in the
> when
>



Paul Mitchum

2005-05-25, 8:56 pm

naft <xman(removespa-m-)@naft(removespa-m-).be> wrote:

> i am looking for a good tutorial on how to place (links to) images in a
> mysql database.
> anyone a good address?
> my major problem is finding out what the url of the db is, in order to
> have correct paths to the image to put in the db
> thanks


<http://www.sitepoint.com/article/ph...-system-minutes>
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com