Re: upload an image and store it in mysql
| From: | i sidhu | Date: | Sat, 17 Jul 2004 05:52:00 +0000 |
| Subject: | Re: upload an image and store it in mysql | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-190813@lists.php.net to get a copy of this message | ||
* iNder Sidhu wrotes:-
I use following query to upload the image in database
DATABASE_query_die("INSERT INTO images (
name, status,
image, size, type) VALUES (name.gif', NULL,
0x52306c474f446c685a414179414f594141502f2f2f2f2f3238502f31372f54313976503, '1.624 kb',
'image/gif')");
0x52306c474f446c685a414179414f594141502f2f2f2f2f3238502f31372f54313976503 - This is base64 code for
ur image.
Curt Zirzow <php-general@zirzow.dyndns.org> wrote:
* Thus wrote raditha dissanayake:
> The approach that an overwhelming majority of PHP developers (and other
> developers for that matter) use is to simply store the image on the
> file system. If these images are part of a web application you can then
> store a reference to the image in the database (ie: the filename only).
> Then all you need to do is to query the database and use the result in
> an nothing could be simpler.
height and width are handy as well.
Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---------------------------------
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!