Re: Image Fields and PHP...
| From: | Lerp | Date: | Thu, 17 Jan 2002 20:26:21 +0000 |
| Subject: | Re: Image Fields and PHP... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-80966@lists.php.net to get a copy of this message | ||
Hi again, I guess one really good reason for not storing images directly in
a db table is performance. When you store a blob in a table it affects the
whole database's performance. It slows it down, that's why the most common
method is to store the images in a dir on the webserver and store only the
path to the image in the databse field. That code I posted in the previous
will allow uploading of an image to a directory on the server, store the
path to the image in the correct record for retrieval at a later point. It
also retrieves an image for a particular record.
HTH Joe :)
"Zara E Gonzalez" <gonzalze@mail.slh.wisc.edu> wrote in message
news:816EFCC70BCAD411B44D0090278F1841051090@slhmailehd.slh.wisc.edu...
> Not sure if this is off topic for this list or not, but thought I would
try...
>
> I have a Linux server running Redhat 7.0, PHP 4.1.1, and freetds 0.53. My
Linux
> server connects to a Win2k server running MSSQL 2000.
>
> Everything works wonderfully, except, I have an image field in one of my
tables
> and I can't seem to find a way to pull it out without having PHP
completely
> freak out. (i.e. I get no error message at all just "page cannot be
displayed")
>
> So I'm wondering, can you pull image fields out with PHP?
>
> If so, I'm guessing my limitation is freetds. If not, is there any way to
pull
> an image out of a database using php? (i.e. store it in a different type
of
> field not image.)
>
> Any help is appreciated,
>
> Thanks,
>
> Zara