You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
886 B
MySQL

#
# Exports the `item_db2` to TXT format
#
SELECT
`id`, `name_english`, `name_japanese`, `type`, IFNULL(`price_buy`, ''), IFNULL(`price_sell`, ''), IFNULL(`weight`, ''), IFNULL(`attack`, ''), IFNULL(`defence`, ''), IFNULL(`range`, ''), IFNULL(`slots`, ''), IFNULL(`equip_jobs`, ''), IFNULL(`equip_upper`, ''), IFNULL(`equip_genders`, ''), IFNULL(`equip_locations`, ''), IFNULL(`weapon_level`, ''), IFNULL(`equip_level`, ''), IFNULL(`refineable`, ''), IFNULL(`view`, ''),
CASE
WHEN ISNULL(`script`) THEN "{}"
ELSE CONCAT("{ ", `script`, " }")
END,
CASE
WHEN ISNULL(`equip_script`) THEN "{}"
ELSE CONCAT("{ ", `equip_script`, " }")
END,
CASE
WHEN ISNULL(`unequip_script`) THEN "{}"
ELSE CONCAT("{ ", `unequip_script`, " }")
END
FROM `item_db2`
INTO OUTFILE 'C:/item_db2.txt'
FIELDS OPTIONALLY ENCLOSED BY ''
TERMINATED BY ','
ESCAPED BY ''
LINES TERMINATED BY '\r\n';