Connecting Tech Pros Worldwide Help | Site Map

php and informix blob

Eric Jamison
Guest
 
Posts: n/a
#1: Jul 17 '05
I am running PHP 4.2.3 with Informix Dynamic Server 2000 Version 9.20.HC. I
am trying to insert some text into a blob space and I get a -609 error.

here is a code snipit.

$textid = ifx_create_blob(0,0,$strText);

$blobidarray[] = $textid;

$db_query = "insert into assignment_info
(user,emp_ext,status,hardware_id,emp_assigned_id,d esc)
values('$strEmp_Name','$strEmp_Ext','1','$strSubCa tegory','0',?)";
$result = ifx_query($db_query, $connection, $blobidarray);
if (!$result)
{
echo ifx_errormsg();
}
else
{
ifx_free_result($result);
}

I don't what I am doing wrong. Either the php is bad or my creation of the
blob space and the column are bad.


Pedro Graca
Guest
 
Posts: n/a
#2: Jul 17 '05

re: php and informix blob


Eric Jamison wrote:[color=blue]
> I am running PHP 4.2.3 with Informix Dynamic Server 2000 Version 9.20.HC. I
> am trying to insert some text into a blob space and I get a -609 error.
>
> here is a code snipit.[/color]
(snip)
[color=blue]
> $result = ifx_query($db_query, $connection, $blobidarray);[/color]
(snip)


<quote src="http://www.php.net/ifx_query">
int ifx_query ( string query, int link_identifier [, int cursor_type [,
mixed blobidarray]])

Returns a positive Informix result identifier on success, or FALSE on
error.
</quote>

So it seems you are lacking a parameter (cursor_type) in your
ifx_query() call.

I never used informix, so this may be wrong (but I tend to trust the
manual :).

Hope this helps
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Closed Thread