mirror of
https://grond.iut-fbleau.fr/stiti/SAE_2.02
synced 2024-11-09 21:11:40 +01:00
20 lines
537 B
PHP
20 lines
537 B
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Model_artist extends CI_Model {
|
|
public function __construct(){
|
|
$this->load->database();
|
|
}
|
|
|
|
public function getArtisteById($artiste_id){
|
|
$query = $this->db->query("SELECT * FROM artist WHERE id = ?", array($artiste_id));
|
|
return $query->row();
|
|
}
|
|
|
|
public function getArtists($order = 'ASC'){
|
|
$query = $this->db->query("SELECT * FROM artist ORDER BY name " . $order);
|
|
return $query->result();
|
|
}
|
|
}
|
|
?>
|