Re: php and SQLCODE=-609
Posted in 2004
Hi Eric If the field is of type TEXT, according to the PHP manual http://us3.php.net/manual/en/function.ifx-create-blob.php the call to ifx_create_blob should be: $textid = ifx_create_blob(1,0,$strText); And also, just in case the variable $blobidarray already has some content, I'd use: $blobidarray = array($textid); Also check you you set to store the text as varchar with the call: ifx_textasvarchar(1); If your field is not of type TEXT, please give me more info. HTH PS. I recomend you to use some database abstract layer for PHP, I'm using ADODB http://php.weblogs/ADODB and works fine with BLOBs. ----- Original Message ----- From: "Eric Jamison" <em_jamison@yahoo.com> To: <informix-list@iiug.org> Sent: Wednesday, January 21, 2004 4:28 PM Subject: php and SQLCODE=-609 > 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,desc) > values('$strEmp_Name','$strEmp_Ext','1','$strSubCategory','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. > > sending to informix-list