如何在php cassa中保存DateTime?

时间:2012-10-29 07:22:25

标签: cassandra datetime-format phpcassa

我正在尝试使用phpcassa将DateType保存到cassandra数据库。

这就是我的所作所为:

$date = new DateTime();
$column_family_commentByPost = new ColumnFamily($pool, 'commentByPost');
$column_family_commentByPost->insert($my_uuid_string1, array($date->getTimestamp() => $my_uuid_string2));
$array = $column_family_commentByPost->get($my_uuid_string1);
var_dump($array);

我收到以下错误:

注意:unserialize():C中10个字节的偏移0处的错误:第20行的... \ DateType.php

使用php保存DateType的正确方法是什么?

0 个答案:

没有答案
相关问题