Exemplo n.º 1
0
 /**
  * Allows one to quickly do a NOT IN MySQL query.
  *
  * @param string $field - The field to check against.
  * @param array $values
  */
 public function whereFieldValueIsNotIn($field, $values)
 {
     if (!count($values)) {
         return $this;
     }
     // Escape the values.
     $inString = '';
     foreach ($values as $value) {
         $inString .= $this->_zendDb->quote($value) . ',';
     }
     $inString = rtrim($inString, ',');
     $this->where($this->_zendDb->quoteIdentifier($this->tableNameOrAlias() . '.' . $field) . ' NOT IN (' . $inString . ')');
     return $this;
 }