Examples
// select * from wp_users where id = 2
$table->where( 'id', 2 )->get();
// select * from wp_users where id != 42
$table->where( 'id', '!=', 42 )->get();
// select * from wp_users where id = 2 and active = 1
$table->where( 'id', 2 )->where( 'active', 1 )->get();
$table->where( 'id', 2 )->andWhere( 'active', 1 )->get();
// select * from wp_users where id = 2 or active = 1
$table->where( 'id', 2 )->orWhere( 'active', 1 )->get();
// select * from wp_users where ( a = 'b' or c = 'd' )
$table->orWhere( array(
array( 'a', 'b' ),
array( 'c', 'd' ),
) )->get();
// select * from wp_users where a = 1 or ( a > 10 and a < 20 )
$table->where( 'a', 1 )
->orWhere( array(
array( 'a', '>', 10 ),
array( 'a', '<', 20 ),
), 'and' )->get();
// select * from wp_users where a = 1 or ( a > 10 and a < 20 ) and c = 30
$table->where( 'a', 1 )
->orWhere( array(
array( 'a', '>', 10 ),
array( 'a', '<', 20 ),
), 'and' )
->andWhere( 'c', 30 )->get();
// select * from wp_users where id in (23, 25, 30)
$table->whereIn( 'id', array( 23, 25, 30 ) );
// select * from wp_users where id not in (23, 25, 30)
$table->whereNotIn( 'id', array( 23, 25, 30 ) );
// select * from wp_users where skills in ('php', 'javascript', 'ruby')
$table->whereIn( 'skills', array( 'php', 'javascript', 'ruby' ) );
// select * from wp_users where id between 10 and 100
$table->whereBetween( 'id', array( 10, 100 ) );
// select * from wp_users where id not between 10 and 100
$table->whereNotBetween( 'id', array( 10, 100 ) );
// select * from wp_users where dates between '10-04-2018' and '10-09-2018'
$table->whereBetween( 'dates', array( '10-04-2018', '10-09-2018' ) );
// select * from wp_users where id is null
$table->whereNull( 'id' )->get();
// select * from wp_users where name is not null
$table->whereNotNull( 'name' )->get();