mirror of
https://grond.iut-fbleau.fr/stiti/SAE_2.02
synced 2024-12-29 18:12:18 +01:00
31 lines
782 B
PHP
31 lines
782 B
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Utilisateur_model extends CI_Model {
|
|
|
|
public function __construct(){
|
|
parent::__construct();
|
|
$this->load->database();
|
|
}
|
|
|
|
public function insert_user($data){
|
|
return $this->db->insert('utilisateur', $data);
|
|
}
|
|
|
|
public function get_user($email) {
|
|
$query = $this->db->get_where('utilisateur', array('email' => $email));
|
|
return $query->row();
|
|
}
|
|
|
|
public function get_user_by_id($id) {
|
|
$query = $this->db->get_where('utilisateur', array('id' => $id));
|
|
return $query->row();
|
|
}
|
|
|
|
public function update_user($id, $data){
|
|
$this->db->where('id', $id);
|
|
return $this->db->update('utilisateur', $data);
|
|
}
|
|
}
|
|
?>
|