SaeDEV2.2/CI3/application/models/Model_site.php

24 lines
458 B
PHP
Raw Normal View History

<?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();
}
}