Closed jayeshjain24 closed 9 years ago
I never used atomic batches with this driver in production, and I know that it is not tested. But it should work. Have a try with something like: $db->exec("BEGIN BATCH UPDATE table set full_name='USER1' where my_key='u1' UPDATE table set full_name='USER2' where my_key='u2' APPLY BATCH;");
But I think best option is to use the new DataStax driver: https://github.com/datastax/php-driver
It has full support to atomic batch https://github.com/datastax/php-driver/tree/master/features#batch-statements
But I think best option is to use the new DataStax driver: https://github.com/datastax/php-driver
Thank you for the link!
@sandro-lex Thx. Its working.
But when I var_dump the result ,it gives me 0 even when it inserts all the rows. Is there any way to get the acknowledgement whether the atomic operation was succesful or not?
I want to make 100 inserts with the entire process being atomic. Can I do it with this php driver?