Question

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?

Was it helpful?

Solution

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top