|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2003-09-12 05:38 UTC] tqnam at pmail dot vnn dot vn
 Description:
------------
I insert a blob value into table, but when i get blob value it is erro, please help me get it.
Reproduce code:
---------------
// the code insert blob value
$query="insert into blobimage(pit_id,pit_image) values(5,FILETOBLOB('".$pathfile."','server'))";
$stmt=ifx_query($query,$con);
if(!$stmt){print("errors");}
ifx_free_result($stmt);
ifx_close($con);
// The code I get blob value
$query="select pit_image from blobimage where pit_id=5";
ifx_blobinfile_mode(1); 
$stmt=ifx_query($query,$con);
if(!$stmt){print("errors");}
$row=ifx_fetch_row($stmt);
$content=ifx_get_blob($row["pit_image"]);
ifx_free_result($stmt);
ifx_close($con);
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 14:00:01 2025 UTC | 
I used PHP4.3.3, Webserver ISS. I used code follow to insert Blob value in too table $query="insert into blobimage(pit_id,pit_image) values(5,FILETOBLOB('".$pathfile."','server'))"; $stmt=ifx_query($query,$con); if(!$stmt){print("errors");} ifx_free_result($stmt); ifx_close($con); But when I get Blob value by the code $query="select pit_image from blobimage "; ifx_blobinfile_mode(0); ifx_nullformat(1); $stmt=ifx_query($query,$con); if(!$stmt){print("errors");} $row=ifx_fetch_row($stmt); $content=ifx_get_blob($row["pit_image"]); ifx_free_blob($row["pit_image"]); ifx_free_result($stmt); ifx_close($con); PHP show error massege "The instruction at "0x250075f0" preferenced memory at "0x0000000". The memory could not read".