Hello--
I can't quite seem to get this to work. What I'm trying to do is pull data
out of a MySQL db of an image that I had put into the db. When I originally
put the image into the db I had to use the "addslashes" function so that it
would be inserted into the db correctly. Now when I select
mediumtext is long enough, but you are putting binary data into it, not
text. You should be using mediumblob. The limit is 16M for that column
type.
-Rasmus
On Fri, 29 Mar 2002, Jay Paulson wrote:
> Hello--
>
> I can't quite seem to get this to work. What I'm trying to do is pull data
> out
## Heres where I add images to DB with field type of BLOB for image
if ( ($submit == 'Add Image') && ($userid != 'demo') ){
if ($image != 'none'){
$name = strtr($name, "'", " ");
$image = addslashes(fread(fopen($image, "r"), filesize($image)));
mysql_select_db($dbase) or die(
3 matches
Mail list logo