En Ci, tengo la siguiente función. ¿Cómo pruebo que la consulta se insertó correctamente sin error?Cómo probar si Ci insertó datos con éxito
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')");
}
gracias hombre! Esta fue una gran ayuda. –
O simplemente: 'return $ this-> db-> affected_rows()> 0;' – harrison4