php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19061 Insert Statment Fail bcoz of Lenght too long
Submitted: 2002-08-22 22:15 UTC Modified: 2002-08-24 05:08 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: c_aluthge at hotmai dot com Assigned:
Status: Not a bug Package: Informix related
PHP Version: 4.1.2 OS: HP UX 11.00
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: c_aluthge at hotmai dot com
New email:
PHP Version: OS:

 

 [2002-08-22 22:15 UTC] c_aluthge at hotmai dot com
I'm trying to insert a record to one of my talble.
The column "comments" is a Char (1250) , but i cant insert any values thru my PHP Program with a lenth more than 256 Char. 

this is the SQL Statment 

     $insert_record = "insert into msm_account".                                
               "(account_num,comments,activity_type,due_activity_type,record_stat,due_date,entry_date,update_date,update_user)". "values '$account_num','$comments','$activity_type','$due_activity_type',"."'$record_stat','$due_date','today','today','$user_name')";      


Output of the statment .... 


Lenght : 259
Insert : insert into <TABLE NAME> account_num,comments,activity_type,due_activity_type,record_stat,due_date,entry_date,update_date,update_user)values
('510000075','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa','NONE','NONE','N','23/08/2002','today','today','xxxx')


Warning: Prepare fails (E [SQLSTATE=IX 000 SQLCODE=-280]) in /www/htdocs/MSm/docs/xxx_rec.php on line 57
Failed to Insert record 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-23 01:42 UTC] derick@php.net
Which database is this?
 [2002-08-23 01:59 UTC] c_aluthge at hotmai dot com
It's a Informix DATABASE 7.31
 [2002-08-23 02:45 UTC] georg@php.net
category changed
 [2002-08-23 08:21 UTC] c_aluthge at hotmai dot com
Any luck on this ???
 [2002-08-23 09:45 UTC] georg@php.net
Informix-Error 280 says: 
Error 280: A quoted string exceeds 256 bytes.

So why should this be a PHP Problem?

-> Bogus


 [2002-08-23 20:48 UTC] c_aluthge at hotmai dot com
It's because Informix can handel the string even it's 1000 char's . 
But i think the ifx_query, or the INFORMIX DRIVER for php can't handel more than 256 Chars .

Thanks
 [2002-08-24 05:08 UTC] georg@php.net
PHP uses the Informix Client SDK, which is available on IBM's website and which is not part of PHP!

I'm not a Informix-Programmer but it looks like you have to insert strings > 255 over an char object, which can be created with ifx_create_char
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC