• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

Help with SQL Query

Started by Nitrofish, May 17, 2022, 10:02:10 AM

Nitrofish

I want to update the image columns of a range of id's so that each song on an album references only one file 'image_name.jpg' instead of the same file with different file names. This doesn't work. Is this possible, or am I just doing it wrong?

UPDATE `database_name`.`songs` SET `image`='image_name.jpg' WHERE `ID`=10, 11, 12, 13, 14, 15, 16, 17;
RadioDJ v2.0.0.6 | MariaDB v10.5

stevewa

UPDATE `database_name`.`songs`
SET `image`='image_name.jpg'
WHERE `ID`IN (10, 11, 12, 13, 14, 15, 16, 17)
;


Nitrofish

#2
Have your tested this? I'll give it a try and report back. Thank you.

UPDATE: Works fine, thanks so much! This will save me so much time!
RadioDJ v2.0.0.6 | MariaDB v10.5

stevewa