Created
March 8, 2013 21:30
-
-
Save memorycraft/5120032 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //ライブラリのロード | |
| require_once __DIR__."/lib/autoload.php"; | |
| //コネクションプールの使用 | |
| use phpcassa\Connection\ConnectionPool; | |
| $pool = new ConnectionPool("Hogebook", array("10.0.1.10")); | |
| //接続の取得 | |
| $raw = $pool->get(); | |
| //CQLクエリの発行 | |
| $rows = $raw->client->execute_cql_query("SELECT * FROM User", 2); | |
| //結果の取得 | |
| $pool->return_connection($raw); | |
| unset($raw); | |
| //接続の解除 | |
| $pool->close(); | |
| //結果の表示 | |
| print_r($rows); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment