diff --git a/ci/application/models/Model_music.php b/ci/application/models/Model_music.php index 832c9df..1011843 100644 --- a/ci/application/models/Model_music.php +++ b/ci/application/models/Model_music.php @@ -50,9 +50,10 @@ class Model_music extends CI_Model { } public function createPlaylist($name_playlist){ + $playlist_id = mt_rand(1, 10); $name_playlist_escaped = $this->db->escape($name_playlist); $query = $this->db->query( - "INSERT INTO playlist VALUES (1, $name_playlist_escaped); + "INSERT INTO playlist (name) VALUES ($name_playlist_escaped); " ); }