Groups > Novell > MySQL with Novell > =?ISO-8859-8-i?B?4fLw6envOiBSZTogQ29sdW1uIFwgRmllbGQgZm9yIG1l?=




Column \ Field for media files

Column \ Field for media files
Thu, 09 Mar 2006 12:03:57 GMT
Hi!

Server system SBS (Novell Small Business suite) 6.5 sp 1 with MySQL ver.
4.0.15a, PHP 4.2.3, all of them on same machine.

What is the type of the Column \ Field that can store a GIF\JPEG\video\sound
files?

What is  the assignment statement?

TIA

Post Reply
Re: Column \ Field for media files
Fri, 10 Mar 2006 09:58:35 GMT
Hi!


>
> What is the type of the Column \ Field that can store a
GIF\JPEG\video\sound files?
>


BLOB or LONGBLOB.


> What is  the assignment statement?
>

create table myblob(file_content longblob);
insert into myblob(file_content) values (load_file('/path/to/your/file'));


Note, it's not recommended to store large files inside a database.  It's
better to store a filename/path and keep the real files on the filesystem.
NSS is very good for it.


Regards,

Post Reply
=?ISO-8859-8-i?B?4fLw6envOiBSZTogQ29sdW1uIFwgRmllbGQgZm9yIG1l?=
Fri, 10 Mar 2006 18:10:02 GMT
Thanks!

Nanu

>>> deva<shane@absamail.co.za> 10/03/2006 11:58:35 >>>

Hi!


>
> What is the type of the Column \ Field that can store a
GIF\JPEG\video\sound files?
>


BLOB or LONGBLOB.


> What is  the assignment statement?
>

create table myblob(file_content longblob);
insert into myblob(file_content) values (load_file('/path/to/your/file'));


Note, it's not recommended to store large files inside a database.  It's
better to store a filename/path and keep the real files on the filesystem.
NSS is very good for it.


Regards,
Post Reply
about | contact