The code can be all one line or many lines.
IF the syntax is correct, you just have to end each line with a semicolon so the MySQL can know what to do.
Code:
SET @ZXconfig=0;
SELECT @ZXconfig:=configuration_group_id;
FROM configuration_group;
WHERE configuration_group_title= 'ZX Slideshow';
LIMIT 1;
DELETE FROM configuration WHERE configuration_group_id = @ZXconfig;
DELETE FROM configuration_group WHERE configuration_group_id = @ZXconfig;
DELETE FROM admin_pages WHERE page_key = 'configZXSlideshow';