Method | Description | |
---|---|---|
andWhere ( $condition ) | Add WHERE . | |
orWhere ( $condition ) | Add WHERE . | |
where ( $condition ) | Set WHERE condition |
$sb = new SelectBuilder();
$sb
->select('u')
->from('users', 'u')
->where('u.username LIKE ?', '%Smith%')
->andWhere('u.is_active = ?', 1);
public andWhere ( $condition ) | ||
$condition | Optional the query restriction predicates |
$sb = new SelectBuilder();
$sb
->select('u.name')
->from('users', 'u')
->where('u.id = 1')
->orWhere('u.id = ?', 2);
public orWhere ( $condition ) | ||
$condition | Optional the query restriction predicates |
$sb = new SelectBuilder();
$sb
->select('u.name')
->from('users', 'u')
->where('u.id = ?', $id)
;
public where ( $condition ) | ||
$condition | optional the query restriction predicates |