On Tue, 13 Aug 2002, Aziz Durmaz wrote: > How we can import a zip file into the blob field ? > > I can import zip file into mysql but when i export it. The zip files doesnt > works. And its size becames smaller.
Aziz, you are not extremely generous in describing what you tried to do and how you did it. Rather you leave it up to the rest of us to guess what went wrong. MySQL will reliably give you back what you stored before. Have you read the manual about escaping data? You may use the LOAD_FILE() function to insert or escape your data. <quote> LOAD_FILE(file_name) Reads the file and returns the file contents as a string. The file must be on the server, you must specify the full pathname to the file, and you must have the `FILE' privilege. The file must be readable by all and be smaller than `max_allowed_packet'. If the file doesn't exist or can't be read due to one of the above reasons, the function returns `NULL': mysql> UPDATE tbl_name SET blob_column=LOAD_FILE("/tmp/picture") WHERE id=1; </quote> <quote> Literals: How to Write Strings and Numbers If you want to insert binary data into a string column (such as a `BLOB'), the following characters must be represented by escape sequences: `NUL' ASCII 0. You should represent this by `\0' (a backslash and an ASCII `0' character). `\' ASCII 92, backslash. Represent this by `\\'. `'' ASCII 39, single quote. Represent this by `\''. `"' ASCII 34, double quote. Represent this by `\"'. </quote> > Is there anybody can help me??? No, probably not. Regards, Thomas --------------------------------------------------------------------- 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