FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=17287&edit=1

ID: 17287
Updated by: alec@alec.pl
Reported By: afanstudio at gmail dot com
Summary: failed to insert gzcompress()ed values into field
Status: Open
Type: Bug
Package: MDB2
Operating System: Irrelevant
Package Version: 2.5.0b2
PHP Version: Irrelevant
Roadmap Versions:
New Comment:

What mysql version? What is the type of the 'data' column? What is the
database encoding? What driver are you using (mysql/mysqli)? What PHP
version?

The compressed string contains some non-ascii characters. The second
character is \x9C. This can be some encoding issue.


Previous Comments:
------------------------------------------------------------------------

[2011-02-17 11:52:05] fzhan

I think it was MyISAM

------------------------------------------------------------------------

[2011-02-16 10:17:50] alec

What database engine are you using?

------------------------------------------------------------------------

[2010-04-02 15:08:07] fzhan

Description:
------------
using autoExecute with MDB2_AUTOQUERY_INSERT, provide a gzcompressed()
str, failed to add the full data into the database.

Test script:
---------------
$this->fields=array('data' => gzcompress('test'));
$resource = $this->dbBaseObject->extended->autoExecute($this->tableName,
$this->fields, MDB2_AUTOQUERY_INSERT);
if (PEAR::isError($resource)) {
die($resource->getMessage());
}

Expected result:
----------------
value of gzcompress('test')

Actual result:
--------------
x (seems to be partial data remained in the field)

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedMar 13, '11 at 11:17a
activeMar 13, '11 at 11:17a
posts1
users1
websitepear.php.net

1 user in discussion

Alec: 1 post

People

Translate

site design / logo © 2022 Grokbase