Search code examples
nosqlcassandraphpcassa

Cassandra update column


how can i update column in cassandra database??

columnfam{
  username{
    name:edds,
    surname:surname,
    email:[email protected]
  }
}

for example i need update surname??

im using php client PHPCASSA.

thanx


Solution

  • As Octopus-Paul says, updates are the same as inserts. There's no need to read before writing, though. You can just do this:

    $column_family->insert('username', array('surname' => $new_surname));