MDB_QueryTool::_checkColumns trims numeric input

From: Date: Thu, 26 Jan 2006 14:08:44 +0000
Subject: MDB_QueryTool::_checkColumns trims numeric input
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22692@lists.php.net to get a copy of this message
Hi I have a problem with the MDB_QueryTool. If I save a record the function MDB_QueryTool_Query::_checkColumns (in MDB/QueryTool/Query.php) trims my input. The problem is that my input is a number and _checkColumns only checks the number of digits what is completely wrong for numbers. This makes only sense for strings. My DB-field is declared as 'int8' (= bigint = 8 bytes) and now this method assumes that the number can have only 8 digits! So a number 123456789 is trimmed to 12345678. Then I thought it's because my "number" is passed as string not as integer. If I var_dump the data-array in MDB_QueryTool_Query::add you can see that it's still an integer in the QueryTool-code: ... ["timestmp"]=> int(1138282831) ... IMHO this is a bug. If I comment this "length-check" out everything works fine. Any comments? I'm using: PHP 4.4.0 MDB 1.3.0 stable MDB_QueryTool 1.0.1 stable PEAR 1.4.6 stable Postgres 8.0.3 thanks lukas

« previous php.pear.general (#22692) next »