CommonQuery::buildQuery PHP Method

buildQuery() protected method

protected buildQuery ( ) : string
return string
    protected function buildQuery()
    {
        // first create extra join from statements with columns with referenced tables
        $statementsWithReferences = array('WHERE', 'SELECT', 'GROUP BY', 'ORDER BY');
        foreach ($statementsWithReferences as $clause) {
            if (array_key_exists($clause, $this->statements)) {
                $this->statements[$clause] = array_map(array($this, 'createUndefinedJoins'), $this->statements[$clause]);
            }
        }
        return parent::buildQuery();
    }

Usage Example

Ejemplo n.º 1
0
 protected function buildQuery()
 {
     if (!isset($this->statements['SELECT']) || !$this->statements['SELECT']) {
         $this->statements['SELECT'][] = $this->fromAlias . '.*';
     }
     return parent::buildQuery();
 }
All Usage Examples Of CommonQuery::buildQuery