Mysql记录被截断

时间:2014-05-01 12:26:54

标签: php mysql row

以下是我的情景:

  some code..
  $fil = implode(", ", $fields);
  $val = implode(", ", $values);
  $query = "INSERT INTO {$table} (" . $fil . ") VALUES (" . $val . ")";

$ val是这样的:
'2014-05-01', '0', '0', '222', 'a', 'b', 'c', '["53623cdc1995f.jpg","53623cdc19d36.jpg","53623cdc1a11e.jpg","53623cdc1a50d.jpg"]'

问题是,当带有$ val图像的部分较长时,由于某种原因将其截断为:
["event_id_49_image_id_535fbd9807b2e.jpg","event_id_49_image_id_535fbd9807f23.jpg","event_id_49_imag

行类型为Longtext,因此应该留有足够的空格。

更新:SHOW CREATE TABLE

CREATE TABLE `Events` (
 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  ...
 `image[]` longtext COLLATE utf8_czech_ci NOT NULL,
 PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=93 DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci

提前谢谢。

0 个答案:

没有答案