• 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] SQL query error

Status
Not open for further replies.

Noven

Exalted Member
So I increased all stats on items by *50, and noticed my haste is way to high now, so I tried to decrease the haste on every item with this line;

UPDATE item_template SET `stat_value` = `stat_value` / 12 WHERE `stat_type` = 36 ;

But I run upon this error;

Error Code: 1054
Unknown column 'stat_type' in 'where clause'
 

Rochet2

Moderator / Eluna Dev
There are 10 different stat type columns and same amount of stat value columns.
They are named stat_type1, stat_value1, and so on.

As the SQL error says stat_type column does not exist and neither most likely stat_value.
You should do this for each column separately.
 

Noven

Exalted Member
Like this? UPDATE item_template SET `stat_value1` = `stat_value1` / 12 WHERE `stat_type` = 36 ;
 
Like this :

UPDATE item_template SET `stat_value1` = `stat_value1` / 12 WHERE `stat_type1` = 36 ;
UPDATE item_template SET `stat_value2` = `stat_value2` / 12 WHERE `stat_type2` = 36 ;
UPDATE item_template SET `stat_value3` = `stat_value3` / 12 WHERE `stat_type3` = 36 ;
.
.
.
UPDATE item_template SET `stat_value10` = `stat_value10` / 12 WHERE `stat_type10` = 36 ;
 
Status
Not open for further replies.
Top