I've been using Zend Framework for quite a while now, but now I have an issue that's got me puzzled. I have a table (MySQL) with just 2 columns (id
and msg
). The id field is an auto increment value and the msg field is a longtext type.
The following code should work just fine for inserting a record into the table:
$t = new Zend_Db_Table('table1');
$id = $t->insert(array('msg' => $content));
Whenever $content
is just a plain string value like 'blah', it works just fine, like it should. But the fieldtype
is not a longtext type for no reason, the content will be quite large. So now I try to place about 14kb of data in $content
, no exception occurs, the database insert seems to have worked, but only for the first 6kb. The rest of the data is just gone?!
When I try to use to oldfashioned mysql_connect
, mysql_query
, etc routines, it all works like a charm. So it's really seems to be a Zend framework issue... Has anybody else experienced this?
Zend_Db_Table
is configured with the PDO_MYSQL
adapterINSERT
14kb of UTF8-encoded HTML into longtext
columnZend_Db_Table
truncates the data at 6kbmysql_query
can INSERT
the same data without issueZend_Db_Table
can SELECT
all the data without issueerror_reporting(-1)
reveals 'no errors, warnings or notices'mediumblob
works finemediumtext
. Does the insert work now?