Peter Hoskin wrote:
Renzo Clavijo wrote:

hi all..

I'm gonna be more precise:

I wrote a form with fields <text type="file" .... >, then i need to
know how
to upload the files to the MySQL server (postgreSQL wold be
appreciated). It
implies: Which field(s) must have the table where I'll save the
image?. Is
there an example code to upload the file(s)?

Despite common belief, SQL is not suited to the storage of binary files.
SQL is based on ASCII.

wtf? ASCII is a codeset, SQL is a theoretical language specification.
it's like saying 'software is based on computers.' - completely besides the 
point.

from a performance angle I would never suggest putting image/binary data
into a DB. but to say it's not technically suitable is silly - a 'BLOB' field
is designed specifically for the storage of binary data.

Store your files on the filesystem, not SQL.

in practice that is indeed a sound recommendation - what many people do do is
use the DB to store information about the files that have been uploaded
(original size, original name, location on disk, etc) - which can be very
handy indeed.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to