HITESH PATEL wrote: > > respected sir/madam, > > i had to recently encounter of entering the movie > files in a database using the blob datatype. > > the problems i faced are: > > 1) while creating the table how do i mention the size > of the blob field. say.. > > create table test (name varchar(8),movie > blob()); > how to mention its size....
[Sammy] In the manual (http://www.mysql.com/doc/B/L/BLOB.html), it said "In most respects, you can regard a TEXT column as a VARCHAR column that can be as big as you like. In the manual (http://www.mysql.com/doc/C/R/CREATE_TABLE.html), in the create table syntax, you can see you don't need to specify the size of a blob column. The max size of a blob column is defined in the manual (http://www.mysql.com/doc/S/t/Storage_requirements.html) > 2) i used the following command to insert a file > ,though the query said ok but the select statement > showed a null value. > > the command i used is... > update test set > movie=LOAD_FILE("/home/Hitesh/hitesh.txt") where > name="hitesh"; > > 3)what exactly is the max_allowed_packet and how to > increase or decrease it. [Sammy] In the manual (http://www.mysql.com/doc/C/o/Command-line_options.html), you can see the definition of max_allowed_packet. > > 4) how to retrive the file from the database. > > i did go thru the entire manual but the specific query > eluded me...like i got to know that a file locator is > stored in the database which indirectly connects to > that file and so on. > -- Sammy Lau mailto: [EMAIL PROTECTED] - Tell me what you want and I'll tell you how you can live without it. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php