evseevnn-zz / php-cassandra-binary

PHP library for Cassandra database via a binary protocol.
http://evseevnn.github.io/php-cassandra-binary/
MIT License
69 stars 33 forks source link

Wrong insert/update with timestamp column #1

Closed Zemistr closed 10 years ago

Zemistr commented 10 years ago

I have this table:

CREATE TABLE user (
  user_username text,
  user_created timestamp,
  user_mail text,
  user_pass_hash text,
  user_pass_salt text,
  user_updated timestamp,
  PRIMARY KEY ((user_username))
);

I used this query, but the data are stored incorrectly.

INSERT INTO user (user_username,user_created,user_mail,user_pass_hash,user_pass_salt,user_updated)
VALUES (:user_username,:user_created,:user_mail,:user_pass_hash,:user_pass_salt,:user_updated);
Array
(
    [user_username] => foo
    [user_created] => 0
    [user_mail] => bar@baz.fo
    [user_pass_hash] => abcd
    [user_pass_salt] => abcd
    [user_updated] => 1405586785
)
Zemistr commented 10 years ago

Fixed ... The timestamp must be 1405586785000, not 1405586785.

evseevnn-zz commented 10 years ago

Please upgrade and check again. Must be fixed. work?

evseevnn-zz commented 10 years ago

Checked! It works!