Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/292.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 结果与Cassandra的结果相反_Php_Cassandra - Fatal编程技术网

Php 结果与Cassandra的结果相反

Php 结果与Cassandra的结果相反,php,cassandra,Php,Cassandra,我有一个列族,其中列名是时间戳。我需要使用升序检索一定数量的列。我怎样才能做到这一点 我实际上在使用PHP和Cassandra PHP客户端库。找到了一个解决方案,使用了 $data = $this->cassandra->cf("UserNotifications")->get(Cassandra::escape($username), null, null, null, true); 而不是 $data = $this->cassandra->get(...)

我有一个列族,其中列名是时间戳。我需要使用升序检索一定数量的列。我怎样才能做到这一点

我实际上在使用PHP和Cassandra PHP客户端库。

找到了一个解决方案,使用了

$data = $this->cassandra->cf("UserNotifications")->get(Cassandra::escape($username), null, null, null, true);
而不是

$data = $this->cassandra->get(...);
第一种方法在较低级别运行,由于第五个参数,我可以颠倒返回数据的顺序。

找到了一个解决方案,使用

$data = $this->cassandra->cf("UserNotifications")->get(Cassandra::escape($username), null, null, null, true);
而不是

$data = $this->cassandra->get(...);

第一种方法在较低的级别上运行,由于第五个参数,我可以反转返回数据的顺序。

您可以使用类似CQL的“从测试中选择前10个反转的“b”…“a”,其中KEY='dfdsf';”并尝试通过phpcassa或Cassandra PHP执行它。您可以使用类似CQL的方法执行此操作“从测试中选择前10个反向'b'..'a',其中键='dfdsf';并尝试通过phpcassa或cassandraphppdo执行它