SAE_2.02/CodeIgniter-3.1.13/application/models/Cover_model.php
2024-05-22 22:05:48 +02:00

17 lines
402 B
PHP

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Cover_model extends CI_Model {
public function __construct() {
parent::__construct();
$this->load->database();
}
public function get_covers() {
$query = "SELECT id, jpeg FROM cover LIMIT 4";
$result = $this->db->query($query);
return $result->result_array();
}
}