Wiggum
a php framework
$users = $this->db->table('users')->select('*')->fetchRows();select `foo`, `bar`, `baz`, `boom` from `users`
$users = $this->db->table('users')->distinct()->fetchRows();
select distinct `foo`, `bar` from `users
$this->db->table('users')->select('foo')->addSelect('bar')->addSelect(['baz', 'boom'])->fetchRows();
select `foo`, `bar`, `baz`, `boom` from `users`
The orderBy method allows you to sort the result of the query by a given column. The first argument to the orderBy method should be the column you wish to sort by, while the second argument controls the direction of the sort and may be either asc or desc:
$users = $this->db->table('users')
->groupBy('account_id')
->fetchRows();
The groupBy and having methods may be used to group the query results. The having method's signature is similar to that of the where method:
$users = $this->db->table('users')
->groupBy('first_name', 'status')
->fetchRows();Return a limited set by using the limit method. It also has a optional parameter to pass a offset.
$users = $this->db->table('users')
->limit(10)
->fetchRows();
$users = $this->db->table('users')
->limit(10, 20)
->fetchRows();
Set a offset using the offset method.
$users = $this->db->table('users')
->offset(20)
->fetchRows();
Coming Soon