I originally had this question on the N1QL SDK Forum but I this its more of a PHP issue.
I have been able to connect the the cbq-engine via cbq cli tool and perform all types of queries. Its really cool. However when I try to use an sdk to to the same thing I see nothing but NULL as a result from the query.
Here is the sample code in php:
$COUCHBASE_SERVER = “http://172.31.19.145:8091”;
$COUCHBASE_N1QL_SERVER = “http://127.0.0.1:8093”;
$BUCKET = “PUBLIC_BUCKET”;
$SQL = “SELECT * FROM PUBLIC_BUCKET”;
$cb = new CouchbaseCluster($COUCHBASE_SERVER,’’,’’);
$bucket = $cb->openBucket($BUCKET,’’);
$query = CouchbaseN1qlQuery::fromString($SQL);
$res = $bucket->query($query);
I have PHP SDK 2.0.3 and N1QL DP4 all running on ubuntu 14.04