Zone Music....

Applications/Tools written to make running DarkStar easier for the rest of us.
Post Reply
User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Zone Music....

Post by tagban » Wed Apr 09, 2014 8:14 am

I've been trying to rebuild my old stored procedures that I used to have, and am having issues, I was wondering if someone can help with syntax? Its just Navicat not liking me doing multiple lines (If I do what I have written here, it deletes ALL lines except the first one). I know that if I make individual procedures for each of these, it works fine, but I'm trying to combine procedures to reset cities/outlands, as well as turn ON cities/outlands for sunbreeze festival music.

Code: Select all

-- Sunbreeze Festival Music Cities, and City Outlands
UPDATE zone_settings SET music = '227' WHERE zoneid IN ('230','231','232','233','238','239','240','241','242','234','235','236','237');
UPDATE zone_settings SET music = '227' WHERE zoneid IN ('101','102','106','107','115','116');

-- Jeuno Christmas Music
UPDATE zone_settings SET music = '239' WHERE zoneid IN ('243','244','245','246');

-- City Outlands Defaults (Restore after Sunbreeze)
UPDATE zone_settings SET music = '116' WHERE zoneid IN ('106','107');
UPDATE zone_settings SET music = '109' WHERE zoneid IN ('101');
UPDATE zone_settings SET music = '227' WHERE zoneid IN ('102');
UPDATE zone_settings SET music = '113' WHERE zoneid IN ('115','116');

-- SanD Default
UPDATE zone_settings SET music = '107' WHERE zoneid IN ('230','231','232');
UPDATE zone_settings SET music = '156' WHERE zoneid IN ('233');

-- Bastok Default
UPDATE zone_settings SET music = '152' WHERE zoneid IN ('234','235','236');
UPDATE zone_settings SET music = '154' WHERE zoneid IN ('237');

-- Windurst Default
UPDATE zone_settings SET music = '151' WHERE zoneid IN ('238','239','240','241');
UPDATE zone_settings SET music = '162' WHERE zoneid IN ('242');

-- Jeuno Default
UPDATE zone_settings SET music = '110' WHERE zoneid IN ('244','245','246');
UPDATE zone_settings SET music = '117' WHERE zoneid IN ('243');
Now I know my Syntax is wrong, I just don't know what I'm doing wrong, since the lines work individually, does Navicat not like the ; for each line?

User avatar
atom0s
Developer
Posts: 537
Joined: Thu Oct 25, 2012 9:52 am

Re: Zone Music....

Post by atom0s » Wed Apr 09, 2014 2:09 pm

The format is correct for all the lines, if Navicat can't handle them I'd suggest not using it then. MySQL comes with its own SQL editor (MySQL Workbench) that works perfect and has no issues with things like this. (It's made from the same people that made MySQL, so obviously its going to work.)

If you didn't install it, you can get it here:
http://dev.mysql.com/downloads/tools/workbench/

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Zone Music....

Post by tagban » Wed Apr 09, 2014 3:18 pm

Good to know that I wasn't reading the syntax wrong.. :)

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Zone Music....

Post by kjLotus » Wed Apr 09, 2014 5:48 pm

are you executing this as a batch file or trying to jam all these queries into a query in the query editor?

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Zone Music....

Post by tagban » Wed Apr 09, 2014 10:34 pm

Originally was trying to do it as a stored procedure the way I do my IP address update, but wound up creating a query out of these, and that works fine, just named it 1-defaultmusic, 2-jeunoxmas, 3-sunbreeze made it nice and organize, and it worked well.

Post Reply