Message: Class 'QueryScanConsistency' not found

HI
When i try to get the scan consistency it gave me the above error here is my query

$query = "SELECT attendence.* FROM $this->bucket_name attendence

    WHERE attendence.date BETWEEN '$this->date1' AND '$this->date2'  AND attendence.type = 'attendence' AND $where_query

     ORDER BY attendence.date DESC";

    $opts = new \Couchbase\QueryOptions();

    $opts->scanConsistency(QueryScanConsistency::REQUEST_PLUS);

    $result = $this->cluster->query($query,$opts);

    $result =  $result->rows();

Hello @muhammad_ibrahim QueryScanConsistency is within the couchbase namespace try replacing the code which refers to QueryScanConsistency with the one

$opts->scanConsistency(\Couchbase\QueryScanConsistency::REQUEST_PLUS);

1 Like