SaeDEV2.2/CI3/application/models/Model_site.php
2024-06-16 02:03:06 +02:00

24 lines
458 B
PHP

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Model_site extends CI_MODEL {
public function __construct(){
$this->load->database();
}
public function get_evenement($id)
{
$res=$this->db->query("SELECT * from evenement WHERE id=$id");
return $res->row();
}
public function get_commentaire($id)
{
$res=$this->db->query("SELECT * FROM commentaire WHERE id_event=$id");
return $res->result_array();
}
}