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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sun Apr 27 21:01:26 2025 UTC