Comment tester si Ci a correctement inséré des données

En Ci, j'ai la fonction suivante. Comment puis-je tester si la requête est inséré sans erreur?

public function postToWall() {
    $entryData = $this->input->post('entryData');
    $myChurchId  = $this->session->userdata("myChurchId");
    $this->db->query("INSERT IGNORE INTO wallPosts (entryData, entryCreationDateTime, wpChurchId)
                      VALUES('$entryData', NOW(), '$myChurchId')");
}

source d'informationauteur Michael Grigsby