If I use the link to the file, i.e.

    file//C:\filedir\file.pdf or .txt or whatever

how do I  insert/update/delete the file since MySQL is holding only the
link?

BTW David, what are the properties of the field you are inserting to?  Could
that be the problem?

-Kirk

"Julio Nobrega Trabalhando" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>   Instead of uploading to Mysql, why don't you store the file at a
directory
> and on Mysql only the path to it?
>
>   Retrieving files from the hard drive is much faster than doing the same
on
> Mysql, and also access to manipulation (insert, update, delete, etc...)
>
> --
>
> Julio Nobrega.
>
> Um dia eu chego lá:
> http://sourceforge.net/projects/toca
>
> Ajudei? Salvei? Que tal um presentinho?
> http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
>
>
> "David Bouw" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I can't seem to figure out the following.
> >
> > I use the http upload functions a lot, works great!!..
> > For some months now I have been using a small PHP program
> > which I use to upload PDF files of scanned documents and
> > insert them into a Mysql table..
> >
> > Normally these files are small (<250 kb), but I now have a
> > PDF of 1 MB... When uploading files I run the
> > function: chunk_split(base64_encode($binaryfile));
> > to encode it, this to transform the binary file to text.. (Works
great!!!)
> >
> > When the query was called to insert the data, nothing happens,
> > also no error from mysql...  Only think I can think of is that the mysql
> > query string is to long.. ??  (The data when encoded is about 1.3 MB of
> > text)..
> >
> > This is the source code..
> >
> > if (!($userfile_size == 0))
> >    {$fd = fopen ($userfile, "r");
> >     $contents = fread ($fd, filesize ($userfile));
> >     fclose ($fd);
> >     unlink ($userfile);
> >     echo "Eerste RAW: ".strlen($contents);
> >     $encodes_data = chunk_split(base64_encode($contents));
> >     $userfile_name = str_replace(" ", "", "$userfile_name");
> >     echo strlen($encodes_data)." - Displays text size <BR>";  //Works
> right!
> >     mysql ($databasename_boekhoud, "insert mubo_boekhoud_images (data,
> > originalname, groep, type)
> > values '$encodes_data', '$userfile_name', '$groep', '$userfile_type')");
> //
> >     mysql_error(); //No error given..?
> >   }
> >
> > Any suggestions are very much appreciated...
> >
> > With kind regards,
> > David Bouw
> >
> >
>
>



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

Reply via email to