diff --git a/README.md b/README.md index e073e3c..4a365a3 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,17 @@ $row = $response->fetchRow(); // ArrayObject $value = $response->fetchOne(); // mixed ``` +## Iterate over result +```php +// Print all roles +$response = $connection->querySync("SELECT role FROM system_auth.roles"); + +foreach($response AS $rowNo => $rowContent) +{ + echo $rowContent['role']."\n"; +} +``` + ## Query Asynchronously ```php diff --git a/php-cassandra.php b/php-cassandra.php index 93fee56..c90ddb6 100644 --- a/php-cassandra.php +++ b/php-cassandra.php @@ -48,6 +48,7 @@ require 'src/Response/StreamReader.php'; require 'src/Response/Response.php'; +require 'src/Response/ResultIterator.php'; require 'src/Response/Authenticate.php'; require 'src/Response/AuthSuccess.php'; require 'src/Response/Error.php';