public function FrxSQLQueryBuilder::sql in Forena Reports 7.2
Same name and namespace in other branches
- 7.5 FrxSQLQueryBuilder.inc \FrxSQLQueryBuilder::sql()
- 7.3 FrxSQLQueryBuilder.inc \FrxSQLQueryBuilder::sql()
- 7.4 FrxSQLQueryBuilder.inc \FrxSQLQueryBuilder::sql()
* Return the last where clause used for the data block.
1 call to FrxSQLQueryBuilder::sql()
- FrxSQLQueryBuilder::execute in ./
FrxSQLQueryBuilder.inc - * Executes the query that was started with query method * Enter description here ...
File
- ./
FrxSQLQueryBuilder.inc, line 44
Class
- FrxSQLQueryBuilder
- FrxSQLQuery SQL Builder This class defines a common query builder that is used to make SQL safe queries based on named column filteres. @author metzlerd
Code
public function sql() {
$where = '';
$i = 0;
if (count($this->where_clause) > 0) {
foreach ($this->where_clause as $clause) {
$i++;
$where .= $i == 1 ? 'WHERE ' : ' AND ';
$where .= $clause;
}
}
return $where;
}