Re: [phpcassa] get proper value of column

42 views
Skip to first unread message

Tyler Hobbs

unread,
Apr 11, 2014, 11:33:30 AM4/11/14
to phpc...@googlegroups.com
It looks like this also got posted to StackOverflow, so I've answered there: http://stackoverflow.com/questions/22968984/phpcassa-storing-only-one-charecter-values


On Wed, Apr 9, 2014 at 10:42 AM, Ankit ladhania <ankitl...@gmail.com> wrote:
i have been trying my hand on phpcassa for last few days... I gathered a working model from examples and this is what i have come across .. whenever i try to retrieve a row key the value of the column family is only one character  value.....like this

array(2) { 
             [0]=> array(2) {
                                     [0]=> string(1) "l"
                                     [1]=> string(1) "a" 
             }
             [1]=> array(2) {
                                     [0]=> string(1) "v" 
                                     [1]=> string(1) "a" 
             } 
}


and the code for the above is:

                $pool = new ConnectionPool($KS, array('127.0.0.1:9160'));
$users=new ColumnFamily($pool,$CF);
$users->insert_format = ColumnFamily::ARRAY_FORMAT;
        $users->return_format = ColumnFamily::ARRAY_FORMAT;
$email='12...@asdasd.com';
$input=array('col1' => 'val1',
                         'col2' => 'val2',
                         'col3' => 'val3','col4'=>'ladhania');
$users->insert($email,$input);
$row=$users->get($email);
var_dump($row);

--
You received this message because you are subscribed to the Google Groups "phpcassa" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phpcassa+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Tyler Hobbs
DataStax
Reply all
Reply to author
Forward
0 new messages