
Bex wrote:
To actually add the songs do like this:
- Code: Select all
INSERT INTO Playlists (IDPlaylist, IDSong) SELECT ThePlaylistIdHere, Songs.ID FROM songs WHERE bla bla bla
INSERT INTO PlaylistSongs (IDPlaylist, IDSong) SELECT ThePlaylistIdHere, Songs.ID FROM songs WHERE bla bla blaonenonymous wrote:Gee - wouldn't it be great if SQL Viewer could detect if the user had MagicNodes loaded, and if so, give the user a button to automatically move the SQL code into a new MagicNode? just a thought...
nynaevelan wrote:Bex wrote:
To actually add the songs do like this:
- Code: Select all
INSERT INTO Playlists (IDPlaylist, IDSong) SELECT ThePlaylistIdHere, Songs.ID FROM songs WHERE bla bla bla
I couldn't get this part to work, but it did work if I changed it to:
- Code: Select all
INSERT INTO PlaylistSongs (IDPlaylist, IDSong) SELECT ThePlaylistIdHere, Songs.ID FROM songs WHERE bla bla bla
Nyn
Bex wrote:
So it works for you now?
DELETE FROM Playlists WHERE IDPlaylist = 7429DELETE FROM Playlists WHERE IDPlaylist = 7439 AND INSERT INTO PlaylistSongs (IDPlaylist, IDSong) SELECT 7439, Songs.ID FROM songs WHERE PlayCounter > 0DELETE FROM PlaylistSongs WHERE IDPlaylist = 7429DELETE FROM PlaylistSongs WHERE IDPlaylist = 7439INSERT INTO PlaylistSongs (IDPlaylist, IDSong) SELECT 7439, Songs.ID FROM songs WHERE PlayCounter > 0UPDATE Songs SET SongPath = REPLACE(SongPath,':\PUBLIC', ':')Users browsing this forum: No registered users and 25 guests