RE: [PHP] Images in PHP and MySQL

2004-10-06 Thread Ed Lazor
On Friday 01 October 2004 05:52, Ed Lazor wrote: Images take up more space when stored in the db, because you're storing raw binary data. Gif and jpeg are compression methods that convert binary data into something smaller that can be stored in a file. ?? If you store a jpeg file

Re: [PHP] Images in PHP and MySQL

2004-10-06 Thread Gary Hotko
No problem Ed thanks... Actually I was supprised to see this conversation (thread) come back into my GMAIL inbox On Wed, 6 Oct 2004 15:57:12 -0700, Ed Lazor [EMAIL PROTECTED] wrote: On Friday 01 October 2004 05:52, Ed Lazor wrote: Images take up more space when stored in the db,

Re: [PHP] Images in PHP and MySQL

2004-09-30 Thread Jasper Howard
If you're uploading a file then you can make a script that reads the temp file into the database (otherwise you need to muck around with image functions and I'm not the one to ask about that), something like: $image = mysql_escape_string(fread(fopen($_FILES['file']['tmp_name'], r),

Re: [PHP] Images in PHP and MySQL

2004-09-30 Thread GH
HEre is a question that I have been wondering about: - Does the image file use more space in the db or as a file itself (Do Not count the extra data that one would store in the db along with the image... ie. ID number) Thanks On Thu, 30 Sep 2004 09:55:30 -0700, Jasper Howard [EMAIL

RE: [PHP] Images in PHP and MySQL

2004-09-30 Thread Jay Blanchard
[snip] HEre is a question that I have been wondering about: - Does the image file use more space in the db or as a file itself (Do Not count the extra data that one would store in the db along with the image... ie. ID number) [/snip] While better asked on a SQL list, I'll give you an answer

Re: [PHP] Images in PHP and MySQL

2004-09-30 Thread Jasper Howard
I'm not any kind of expert on this, but you just read the file byte for byte, dont you? So it should be the same amount of data. On Thu, 30 Sep 2004 15:51:28 -0400, GH [EMAIL PROTECTED] wrote: HEre is a question that I have been wondering about: - Does the image file use more space in the

RE: [PHP] Images in PHP and MySQL

2004-09-30 Thread Ed Lazor
Images take up more space when stored in the db, because you're storing raw binary data. Gif and jpeg are compression methods that convert binary data into something smaller that can be stored in a file. The recent tests I did took 270megs of images and stored them into 180megs of jpg files.

Re: [PHP] Images in PHP and MySQL

2004-09-30 Thread Jason Wong
On Friday 01 October 2004 05:52, Ed Lazor wrote: Images take up more space when stored in the db, because you're storing raw binary data. Gif and jpeg are compression methods that convert binary data into something smaller that can be stored in a file. ?? If you store a jpeg file into a

Re: [PHP] Images in PHP and MySQL

2004-09-27 Thread Daniel Watrous
for performance reasons. - Original Message - From: GH [EMAIL PROTECTED] To: Daniel Watrous [EMAIL PROTECTED] Cc: GH [EMAIL PROTECTED] Sent: Monday, September 27, 2004 4:31 PM Subject: Re: [PHP] Images in PHP and MySQL Do you know of a good tutorial on this topic. On Mon, 27 Sep 2004 16

RE: [PHP] Images in PHP and MySQL

2004-09-27 Thread Graham Cossey
I'm no certified expert, but preference would be storing a URL to an image in the database rather than the image itself. If however you do want to store them in the db try using a blob column type. This article is PHP3 but shows the basics: http://www.phpbuilder.com/columns/florian19991014.php3

Re: [PHP] Images in PHP and MySQL

2004-09-27 Thread GH
I hope that there are others out there that could weigh in on this topic please The more information and perspective I have the better as it would help me build the most informed decision as posible. On Mon, 27 Sep 2004 23:49:33 +0100, Graham Cossey [EMAIL PROTECTED] wrote: I'm no

Re: [PHP] Images in PHP and MySQL

2004-09-27 Thread Jim Grill
1) there is no need to fiddle with directory permissions to write images. 2) if the content is sensitive you have the added security of the database password (and the fact that the database is ususally not directly accessible). 3) a mysqldump gives a backup of all images along with other