phpnosqlcassandraphpcassa

Increase/Decrease value in phpcassa


Is there any method for simple increase/decrease integer value in cassandra using phpcassa? Maybe it is CounterColumn, but I didn't find anything about how to use it.

Basically, I just want to increase some counter on action, any tips or code sample?


Solution

  • Have you seen this example. ColumnFamily::add() is the easiest way to increment a counter

    $count_cf->add("key1", "col1", 10);