From e1831b92e894627ce8b70c11036593592888a508 Mon Sep 17 00:00:00 2001 From: brigitte Date: Mon, 3 Jun 2024 19:02:08 +0200 Subject: [PATCH] creation playlist fin --- ci/application/models/Model_music.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); " ); }