Created
March 20, 2018 22:14
-
-
Save parzibyte/27a4ecdcc3867744ec8d2aa9467402ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Persona_model extends CI_Model{ | |
function __construct() | |
{ | |
$this->load->database(); | |
} | |
public function nueva($persona){ | |
$this->db->insert("personas", [ | |
"nombre" => $persona->nombre, | |
"edad" => $persona->edad, | |
]); | |
return $this->db->insert_id(); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment