|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-03-28 06:34 UTC] jnoe at nomadsoft dot co dot uk
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 16 22:00:01 2025 UTC |
DESCRIPTION =========== When adding data of type text to our DB, it gets truncated to approx 1150 chars. However, it is not just the first textarea (from a web form) that gets truncated, it is the SUM of the text areas. I.E we have three text areas, if the first is 1700 chars, only the first 1150 (approx) chars of that will be added, and the last two won't be added at all. If the sum of all three is only 1000 chars, all will be added without a problem. We are using Informix 7.1 SAMPLE CODE =========== ... // Blobs - add to blobidarray for the ifx_query case 3: $textid = ifx_create_blob(0,0,"$val"); // NB - even if you change this to // ifx_create_blob(1,0,"$val"), it doesn't work $blobidarray[] = $textid; break; ... ... // If we're not dealing with a blob, add the newly // trimmed and formatted string to the insert statement if ($typeid != 3) { $query = $query . $val . ", "; } // Otherwise add a '?' that will relate to the blobidarray else { $query = $query . "?, "; } ... ... $query = chop($query); // Trim last , $query = substr($query, 0, strlen($query) - 1) . ")"; // Run the query $res = ifx_query($query, $db_conn, $blobidarray); ... COMPILED OPTIONS ================ --with-informix --with-xml --with-apache=/export/oss/apache.new/blah blah --with-gd=no (that's all I can remember - sorry!) PHP3.INI ======== N/A