When you add a table name do it without the prefix. It will be prefixed for you. This is only good for custom queries on tables you created or just custom queries that you can't find a WordPress function that will do it for you.
will get all rows.
Ath_DB::table( 'events' )->get();
will get all rows that matches this ID
Ath_DB::table( 'events' )->where( 'post_id', '=', 420 )->get();
You can specify order as well
Ath_DB::table( 'events' )->where( 'post_id', '=', 420 )->order_by( 'id', 'DESC' )->get();
You can also nest where clauses
Ath_DB::table( 'events' )->where( 'id', '=', 81 )->or_where( 'id', '=', 82 )->get();
Ath_DB::table( 'events' )->insert( [title => "pizza tasting", location => "NYC"] );
You can insert multiple arrays in this form:
Ath_DB::table( 'events' )->insert( [
[title => "pizza tasting", location => "NYC"],
[title => "burger tasting", location => "Chicago"]
] );
Will delete where ID is 25
Ath_DB::table( 'events' )->where( 'id', '=', 25 )->delete();
Will delete all events!
Ath_DB::table( 'events' )->delete();