I'm inserting a textfile as Blob in Informix.
It didn't work with the command I found in PHP4.
I just got an error message below:
-609 illegal attempt to use Text/Byte host variable.
I never know why.
Please give me some advices.
The main code follows:
the last line got error.
<?php
-hier connect with database-
$text_id=ifx_create_blob(1,1,$filename);
$blobidarray[]=$text_id;
$query="insert into table (person,file)
values ('canny',?)";
$res_id=ifx_query($query,$conn_id,$blobidarray);
...
?>
How to insert a file as BLOB in Informix
Did you try using addslashes ?
I tried to add it as follows:
$thefile=addslashes($filename);
$text_id=ifx_create_blob(0,1,$thefile);
...
but it has the same error message.
Do you have more advices?