Does anybody know if it is possible to store a PDF as a BLOB in MySQL the same way you can store images?
Storing PDF as a BLOB
is this problem solved ?
yes ?
Please send me some data on how to do this
thx
Have you been successfull at storing a .pdf as blob ?
If so please send me info on how to store it,
and how to call it !
Thanks,
Peter
Are there any news?
I would like to store .pdf files on
a blob column using "Sql Server 2000".
Any tips???
I would like to store .pdf files on
a blob column using interbase 6.0 and delphi,
somebody help me???
Erez wrote:
Are there any news?
I would like to store .pdf files on
a blob column using "Sql Server 2000".
Any tips???
I am not having any problems storing pdfs as blobs on MySQL (interbase is another story atm).
Here is my code that uploads the file. (Its PHP for those that want to know)
/ Connect to the server /
$db_handle=mysql_connect("localhost","root","");
if (!$db_handle)or die("<BR><BR><H1>\n\nCould not connect to MySQL server</H1>");
mysql_select_db($database) or die("<BR><BR>\n\n<H1>Could not open database|</H1>");
/ Lump the pdf data together /
$file_size=filesize("$filepath$filename");
$file_handle=fopen("$filepath$filename", "r") or die("Could not open file $filename");
$pdf_data=addslashes(fread($file_handle, $file_size));
fclose($file_handle);
/ run a query and store the lot, yay! /
$query="INSERT INTO RUDOLPH (FILENAME, FILE_STUFF) values('$filename', '$pdf_data')";
$out=mysql_query($query) or die("Could not execute query".mysql_error());
/ Close the server conection /
mysql_close($db_handle);
Simple as that.
RUDOLPH is the name of the table if you couldnt get that, FILENAME is a varchar field (can u guese whats in it?) and FILE_STUFF is the binary blob.
Si
BUMP
Can someone please help me on retreving a PDF from a MySQL database ????!!
How does it works ?
Thanks !