Lines Matching refs:statement
12 protected $statement;
22 * @param string $type The type of the statement, either 'AND' or 'OR'
23 * @param null|string $statement The statement or null if this should hold sub statments
25 public function __construct(QueryBuilder $QB, $type = 'AND', $statement = null)
29 if ($statement === null) {
30 $this->statement = [];
32 $this->statement = $statement;
39 * @param string $statement
42 public function whereAnd($statement)
44 return $this->where('AND', $statement);
50 * @param $statement
53 public function whereOr($statement)
55 return $this->where('OR', $statement);
79 * Adds another statement to this sub clause
82 * @param null|string $statement null creates a new sub clause
86 public function where($op = 'AND', $statement = null)
88 if (!is_array($this->statement)) {
94 $where = new QueryBuilderWhere($this->QB, $op, $statement);
95 $this->statement[] = $where;
97 if ($statement) {
113 * @param bool $first is this the first where statement? Then the type is ignored
118 if (!$this->statement) return '';
123 if (is_array($this->statement)) {
126 foreach ($this->statement as $where) {
132 $sql .= $this->statement;