début de la sae
This commit is contained in:
20
codeigniter/application/models/Model_music.php
Normal file
20
codeigniter/application/models/Model_music.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Model_music extends CI_Model {
|
||||
public function __construct(){
|
||||
$this->load->database();
|
||||
}
|
||||
|
||||
public function getAlbums(){
|
||||
$query = $this->db->query(
|
||||
"SELECT album.name,album.id,year,artist.name as artistName, genre.name as genreName,jpeg
|
||||
FROM album
|
||||
JOIN artist ON album.artistid = artist.id
|
||||
JOIN genre ON genre.id = album.genreid
|
||||
JOIN cover ON cover.id = album.coverid
|
||||
ORDER BY year
|
||||
"
|
||||
);
|
||||
return $query->result();
|
||||
}
|
||||
}
|
11
codeigniter/application/models/index.html
Normal file
11
codeigniter/application/models/index.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user