Answer the question
In order to leave comments, you need to log in
Cassandra + PHP + Debian?
In PHP script
<?
$dsn = "cassandra:host=server IP; port=9160";
$db = new PDO($dsn);
$db->exec("USE Keyspace1");
$stmt = $db->prepare("UPDATE users SET full_name = :name WHERE key = :key;");
$stmt->bindValue(':key', 'mikko');
$stmt->bindValue(':name', 'mikko k');
$stmt->execute();
$stmt = $db->prepare("SELECT key, full_name FROM users WHERE key = :key;");
$stmt->bindValue(':key', 'mikko');
$stmt->execute();
var_dump($stmt->fetchAll());
?>
Throw an error
Fatal error: Uncaught exception 'PDOException' with message 'CQLSTATE[08006] [8] TTransportException: Transport not open' in /home/index.php(6): PDO->__construct('cassandra:host=...') #1 {main} thrown in /home/index.php on line 6
What could be the problem?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question