• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] [Trinity] The SQL Query's won't give action to work!

Status
Not open for further replies.

Synth

Exalted Member
Hello Emudevs,so i have made custom query's for i remove gold costs from some items and i'm getting wiered errors first query worked:
Code:
-- 44 gold
UPDATE `item_template` SET `BuyPrice`='440000' WHERE entry in (51022,50966,50805,51582,50998,50798,50048,50761,50049,51562,50052,50776,50999,51326,51553,51385,51561,50794,51791,50781,51819,51801,51384,51011,51788,50793,50759,50787,50046,50771,51021,51010,50047,50051,50810,51004,50760,50050);

-- 48 gold
UPDATE `item_template` SET `BuyPrice`='480000' WHERE entry in (47491,47239,47525,51799,51797,47524,47446,47078,47516,47515,47520,51796,47519,47428,47521,47523,46995,51802,47658,47660,46964,47085,47421,47448,47064,47146,47437,47470,51784,47416,47113,51803,47461,46969,46980,47422,51795,47427,47001,47156,47475,47513,47518,47517,47506,47206,47526,51798,47528,47483);

-- 50 gold
UPDATE `item_template` SET `BuyPrice`='500000' WHERE entry in (47069);

-- 58 gold
UPDATE `item_template` SET `BuyPrice`='580000' WHERE entry in (51857);

-- 64 gold
UPDATE `item_template` SET `BuyPrice`='640000' WHERE entry in (50178,50040,49992,51881,49888,51905,50415);

-- 74 gold
UPDATE `item_template` SET `BuyPrice`='740000' WHERE entry in (50425,50070,51946,49981,51940,51941,51939,50736,51942,51868,51815,50016,50426,51938,51916,50012,50411,51947,50412,50068,51869,50427,51932,51858,50179,51893,49997,51944,50428,51875,51937,50028);

-- 84 gold
UPDATE `item_template` SET `BuyPrice`='840000' WHERE entry in (50727,50429,50695,51945,49919,51880,50033,50034,51927,50444,50472,50474,51834,51838,51845,51852,49976,50065,51812,51909,50173,50423,51922,50458,50463,50464,50454,50456,50457,50455,50460,50461,50459,50462,50710,50692,50035,51003,51876,50184,51910,51846,49982,50183,49968);

-- 94 gold
UPDATE `item_template` SET `BuyPrice`='940000' WHERE entry in (50725,50709,50603,50631,50638,50684,50616,50729,50635,50719,50685,50708,50704,50654,50621,50641,50676,50608);

2nd Query Won't Work:
Code:
-- 44 gold
UPDATE `item_template` SET `BuyPrice`='440000' WHERE entry in (51022,50966,50805,51582,50998,50798,50048,50761,50049,51562,50052,50776,50999,51326,51553,51385,51561,50794,51791,50781);

-- 48 gold
UPDATE `item_template` SET `BuyPrice`='480000' WHERE entry in (47491,47239,47525,51799,51797,47524,47446,47078,47516,47515,47520,51796,47519,47428,47521,47523,46995,51802,47658,47660,46964,47085,47421,47448,47064,47146,47437,47470);

-- 50 gold
UPDATE `item_template` SET `BuyPrice`='500000' WHERE entry in (47069);

-- 58 gold
UPDATE `item_template` SET `BuyPrice`='580000' WHERE entry in (51857);

-- 64 gold
UPDATE `item_template` SET `BuyPrice`='640000' WHERE entry in (50178,50040,49992,51881,49888,51905,50415);

-- 74 gold
UPDATE `item_template` SET `BuyPrice`='740000' WHERE entry in (50425,50070,51946,49981,51940);

-- 84 gold
UPDATE `item_template` SET `BuyPrice`='840000' WHERE entry in (50727,50429,50695,51945,49919,51880,50033,50034,51927,50444,50472,50474,51834,51838,51845,51852,49976,50065,51812,51909,50173,50423,51922,50458,50463,50464,50454,50456,50457,50455,50460,50461,50459,50462);

-- 94 gold
UPDATE `item_template` SET `BuyPrice`='940000' WHERE entry in (50725,50709,50603,50631,50638,50684,50616,50729,50635,50719);
Result of the 2nd one:
Code:
/* Affected rows: 0  Found rows: 0  Warnings: 0  Duration for 8 queries: 0.000 sec. */

The first one worked fine and do action in-game the 2nd one won't work i have no idea i checked custom times what i'm missing but yes nothing idkn what is the error it make me pissed.

Thank you!
Best regards,
Synth !
 

Andrew

ED Beta Tester
Are you trying to remove the gold cost completely from all of these items? Or are you trying to set custom prices? Cause that's what it looks like you're trying to do to me.

If you're trying to just plain remove them all I've found the easiest way to remove buy cost from items is to just do this to all of the items in the DB:


Code:
UPDATE `item_template` SET `BuyPrice`=0;


Also, if you're running a PvP server that's i80, please for the love of god make everything sell-able for 1 copper... It's so much of a pain in the ass to have to type delete and drag and drop stuff to delete it from your bags.

Code:
UPDATE `item_template` SET `SellPrice`=1;




Anyway, I tried to help but I'm not sure what you're trying to do. I'm no certified SQL dev or anything so sorry if I didn't do anything for you.
 

Synth

Exalted Member
Are you trying to remove the gold cost completely from all of these items? Or are you trying to set custom prices? Cause that's what it looks like you're trying to do to me.

If you're trying to just plain remove them all I've found the easiest way to remove buy cost from items is to just do this to all of the items in the DB:


Code:
UPDATE `item_template` SET `BuyPrice`=0;


Also, if you're running a PvP server that's i80, please for the love of god make everything sell-able for 1 copper... It's so much of a pain in the ass to have to type delete and drag and drop stuff to delete it from your bags.

Code:
UPDATE `item_template` SET `SellPrice`=1;



Anyway, I tried to help but I'm not sure what you're trying to do. I'm no certified SQL dev or anything so sorry if I didn't do anything for you.
I'm trying to upate gold costs for those items.
No problem.
 

Tommy

Founder
I just ran all the queries and they ran just fine..

Code:
[SQL] -- 44 gold
UPDATE `item_template` SET `BuyPrice`='440000' WHERE entry in (51022,50966,50805,51582,50998,50798,50048,50761,50049,51562,50052,50776,50999,51326,51553,51385,51561,50794,51791,50781,51819,51801,51384,51011,51788,50793,50759,50787,50046,50771,51021,51010,50047,50051,50810,51004,50760,50050);
Affected rows: 38
Time: 0.219ms

[SQL] 

-- 48 gold
UPDATE `item_template` SET `BuyPrice`='480000' WHERE entry in (47491,47239,47525,51799,51797,47524,47446,47078,47516,47515,47520,51796,47519,47428,47521,47523,46995,51802,47658,47660,46964,47085,47421,47448,47064,47146,47437,47470,51784,47416,47113,51803,47461,46969,46980,47422,51795,47427,47001,47156,47475,47513,47518,47517,47506,47206,47526,51798,47528,47483);
Affected rows: 50
Time: 0.130ms

[SQL] 

-- 50 gold
UPDATE `item_template` SET `BuyPrice`='500000' WHERE entry in (47069);
Affected rows: 1
Time: 0.003ms

[SQL] 

-- 58 gold
UPDATE `item_template` SET `BuyPrice`='580000' WHERE entry in (51857);
Affected rows: 1
Time: 0.006ms

[SQL] 

-- 64 gold
UPDATE `item_template` SET `BuyPrice`='640000' WHERE entry in (50178,50040,49992,51881,49888,51905,50415);
Affected rows: 7
Time: 0.041ms

[SQL] 

-- 74 gold
UPDATE `item_template` SET `BuyPrice`='740000' WHERE entry in (50425,50070,51946,49981,51940,51941,51939,50736,51942,51868,51815,50016,50426,51938,51916,50012,50411,51947,50412,50068,51869,50427,51932,51858,50179,51893,49997,51944,50428,51875,51937,50028);
Affected rows: 32
Time: 0.061ms

[SQL] 

-- 84 gold
UPDATE `item_template` SET `BuyPrice`='840000' WHERE entry in (50727,50429,50695,51945,49919,51880,50033,50034,51927,50444,50472,50474,51834,51838,51845,51852,49976,50065,51812,51909,50173,50423,51922,50458,50463,50464,50454,50456,50457,50455,50460,50461,50459,50462,50710,50692,50035,51003,51876,50184,51910,51846,49982,50183,49968);
Affected rows: 45
Time: 0.047ms

[SQL] 

-- 94 gold
UPDATE `item_template` SET `BuyPrice`='940000' WHERE entry in (50725,50709,50603,50631,50638,50684,50616,50729,50635,50719,50685,50708,50704,50654,50621,50641,50676,50608);
Affected rows: 18
Time: 0.015ms
 

Andrew

ED Beta Tester
They work for me as well when ran separately. Don't know what the problem could be. Just do them manually if anything. /shrug
 

Jameyboor

Retired Staff
Rows will only be affected if they actually change in value, meaning that if the values of the BuyPrice column are already set to the value you want them to set, it will return "affected rows: 0"
 
Status
Not open for further replies.
Top