We were initially using:
/$couchResult = json_decode(json_encode($couchBucket->query($couchQuery)), true);
but I was advised that as this is encoding and then decoding it uses more resources. @srm gave me a tip on how to optimise this by using:
$couchResult = $couchBucket->query(\CouchbaseN1qlQuery::fromString($couchQuery), true);
However, I am receiving this PHP error.
An exception occurred: LCB_EINVAL: Invalid input/arguments in [CouchbaseNative]/CouchbaseBucket.class.php on line 316
_CouchbaseBucket->n1ql_request() in [CouchbaseNative]/CouchbaseBucket.class.php at line 316
CouchbaseBucket->_n1ql() in [CouchbaseNative]/CouchbaseBucket.class.php at line 378
CouchbaseBucket->query() in /var/www/exfusion.net/html/unlink.php at line 48
Does anybody know what I am doing wrong?