$db = Loader::db();
$query = "SELECT * FROM my_table"; $results = $db->query($query);
$data = array( 'name' => 'John Doe', 'email' => 'johndoe@example.com' ); $db->insert('my_table', $data);
$data = array( 'email' => 'newemail@example.com' ); $where = array( 'id' => 1 ); $db->update('my_table', $data, $where);
$where = array( 'id' => 1 ); $db->delete('my_table', $where);Overall, the PHP Loader db package library is a powerful tool for working with databases in PHP. It simplifies the code and makes it easier to work with data in a database.