Fix query

This commit is contained in:
Vincent
2024-06-04 21:29:47 +02:00
parent eef73dd92b
commit de08926fe7
4 changed files with 14 additions and 6 deletions

View File

@@ -16,10 +16,6 @@ class Model_music extends CI_Model {
$this->db->where('genre.name', $genre);
}
if(!empty($query)){
$this->db->where('album.name', $query);
}
if(!empty($artist)){
$this->db->where('artist.name', $artist);
}
@@ -28,6 +24,10 @@ class Model_music extends CI_Model {
$this->db->order_by('album.name', $order);
}
if(!empty($query)){
$this->db->like('album.name', $query);
}
$query = $this->db->get();
return $query->result();
}