Orange-OpenSource / YACassandraPDO

Cassandra PDO Driver fork
Apache License 2.0
85 stars 32 forks source link

Rowcount error #53

Closed shivanshuit914 closed 9 years ago

shivanshuit914 commented 10 years ago

Hi,

I am using this extension with PhalconPhp its giving rowcount error. Notice: Undefined index: rowcount

LexLythius commented 10 years ago

@shivanshuit914 Post your code and the actual error if you want others to help. From your notice, it seems you're doing something like $result['rowcount'] instead of $result->rowCount().

blat commented 10 years ago
$db = new PDO("cassandra:host=localhost;port=9160;dbname=test");
$stmt = $db->prepare("INSERT INTO test (a, b) VALUES (:a, :b);");
$stmt->bindValue(':a', 'foo');
$stmt->bindValue(':b', 'bar');
$stmt->execute();
echo $stmt->rowCount();

Result is always 0 :(

But insert works:

cqlsh:dbtest> select * from test;

 a    | b
------+-----
  foo | bar

(1 rows)

Similar issue with UPDATE and DELETE statement.