As nobody seems to answer your question here, i will give you a pointer to an article i found i 30 seconds using google, i just searched for "insert blob mysql php" an i found this article in oReilly, and it seems that the article is based on a thread in the php mailing list. http://www.onlamp.com/pub/a/php/2000/09/15/php_mysql.html Be carefull with this because it can cause many troubles. If you got a message saying "mysql server gone away" or something like that is because your file if a little big, change the my.ini file and add: set-variable = max_allowed_packet=10M # or whatever you like i think that the default is 1 MB, You should consider changing the max upload size in your php.ini before asking questions about that and saying that it doesn't work :) if you really have to do this way do it if not consider doing this in another way. Any way of solving a problem is right if it is used in the right situation. ----- Original Message ----- From: "Daniel Crespo" <dcrespo2001@xxxxxxxxx> To: <php-db@xxxxxxxxxxxxx> Sent: Tuesday, March 23, 2004 4:24 AM Subject: Re: Store a File (any type) in MySQL > Ok, I'll consider it... But just, please, could you give me an example code > of what I want to do? > > Thanks a lot. > > "Bruno Santos" <brvds@xxxxxxxxxxx> escribió en el mensaje > news:405E4FD9.4000806@xxxxxxxxxxxxxx > > Daniel Crespo wrote: > > > > >Hi everybody... > > > > > >Anyone knows how to store a file (any type) in MySQL? > > > > > >Thanks > > > > > > > > > > > hello > > > > MySql has binary field types, but, are they long (in size) enough for > > your file ? > > if the file is small, i guess you could store the data in the mysql > > field, but, and if files are user choosen ??? > > > > why dont u consider storing the data, or the file, in some directory and > > just put the location (file name) in some field in the database ?? is > > more safe and overflow free > > > > cheers > > > > -- > > ----------------------------------------------------- > > .-'''''-. > > .' `. > > : : > > : : > > : _/| : Bruno Santos > > : =/_/ : brvds@xxxxxxxxxxx > > `._/ | .' > > ( / ,|...-' Pagina Pessoal > > \_/^\/||__ http://feiticeir0.no-ip.org > > _/~ `""~`"` \_ > > __/ -'/ `-._ `\_\__ > > /jgs /-'` `\ \ \-.\ > > > > > > "Written very small on the back poket of a girl's jeans > > - 'If you can read this, you're WAY too close.'" > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php