Exemplo n.º 1
0
 public function addPart(QC $q, $method = null)
 {
     $c = $q->getCriteria();
     if (!empty($c)) {
         if (!$method) {
             $method = 'and';
         }
         $this->_params['criteria'][] = array('method' => $method, 'isComplex' => true, 'params' => $c);
     }
     return $this;
 }
Exemplo n.º 2
0
 private function buildDelete(QC $q)
 {
     $sql = 'DELETE FROM' . ' ' . $this->escapeSqlName($q->getTables());
     $c = $q->getCriteria();
     if (!empty($c)) {
         $sql .= ' WHERE ' . $this->processCriteria($c);
     }
     $sql .= $this->processModifiers($q);
     return $sql;
 }