Сначала я создал семейство столбцов, используя запрос ниже.
CREATE TABLE gb_adminusers
(au_id int,au_created_ip text,au_created_on text, au_email_address text,au_password text,
au_status int, au_updated_on text,au_username text,PRIMARY KEY ((au_id))
) WITH bloom_filter_fp_chance=0.010000 AND caching='KEYS_ONLY' AND comment='' AND
dclocal_read_repair_chance=0.100000 AND gc_grace_seconds=864000 AND
index_interval=128 AND read_repair_chance=0.000000 AND replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND default_time_to_live=0 AND
speculative_retry='99.0PERCENTILE' AND memtable_flush_period_in_ms=0 AND
compaction={'class': 'SizeTieredCompactionStrategy'} AND
compression={'sstable_compression': 'LZ4Compressor'};
Затем успешно вставлены две нижние строки.
au_id | au_created_ip | au_created_on | au_email_address | au_password | au_status | au_updated_on | au_username-------+---------------+---------------------+--------------------+----------------------------------+-----------+---------------+------------
1 | 192.168.2.69 | 2014-09-10 12:02:43 | [email protected] | f2c452187d4af19966187e15f1e944e1 | 1 | null | k2badmin
2 | 192.168.2.68 | 2014-10-09 03:11:24 | [email protected] | 5d9c68c6c50ed3d02a2fcf54f63993b6 | 1 | null | testuser
Когда я пытаюсь использовать выборку из таблицы. Я получил следующие предупреждения.
A PHP Error was encountered
Severity: Warning
Message: unpack(): Type N: not enough input, need 4, have 1
Filename: Cassandra/DataStream.php
Line Number: 66
A PHP Error was encountered
Severity: Warning
Message: reset() expects parameter 1 to be array, boolean given
Filename: Cassandra/DataStream.php
Line Number: 66
A PHP Error was encountered.
И мой набор результатов, как показано ниже:
[rows:protected] => Array
(
[0] => Array
(
[0] =>
[1] => 192.168.2.69
[2] => 2014-09-10 12:02:43
[3] => [email protected]
[4] => f2c452187d4af19966187e15f1e944e1
[5] =>
[6] => k2badmin192.168.2.682014-09-10 03:11:[email protected] 5d9c68c6c50ed3d02a2fcf54f63993b6ÿÿÿÿtestuse
[7] =>
)
[1] => Array
(
[0] =>
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
[6] =>
[7] =>
)
)
)
Как я могу исправить эту проблему. я использую https://github.com/mauritsl/php-cassandra пакет.
Задача ещё не решена.
Других решений пока нет …