PHP code example of brighttalk / acs-query-builder
1. Go to this page and download the library: Download brighttalk/acs-query-builder library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
brighttalk / acs-query-builder example snippets
$query = $qb->searchByFieldValue("fieldName", "'fieldValue'")
->setSize(20)
->setStart(0)
->setRank('-fieldName')
->getQuery();
echo $query;
$query = $qb->setSearchExpression($qb->expr()->andx(
$qb->expr()->eq("aFieldName", "'aFieldValue'"),
$qb->expr()->notx($qb->expr()->eq("anotherFieldName", "'anotherFieldValue'"))
))
->setSize(20)
->setStart(0)
->getQuery();
echo $query;