Welcome to AC Web.
Results 1 to 7 of 7

Thread: Sql Query

  1. #1

    Sql Query


    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Hey guys I would Like to change the season8 gear name from Wrathfull to Brainless can some one make me a sql querry for that? and also i would like to make all the items that start with Wrathfull legendary, any idea for a sql querry for that?

    Thanks in advance!

  2. #2
    Quote Originally Posted by brunolopes View Post
    name from Wrathfull to Brainless!
    UPDATE item_template
    SET name = replace(name, 'Wrathful Gladiator\'s', 'Brainless Gladiator\'s')
    WHERE name LIKE '%Wrathful Gladiator\'s%';
    Last edited by boobler; 03-31-2020 at 10:29 PM.

  3. #3
    Web Developer

    Join Date
    Oct 2010
    Location
    somewhere between <?php and ?>
    Posts
    3,067
    The query above works for replacing the name but it wont make the item legendary so i made another query for you that will also make the items legendary
    Code:
    UPDATE item_template
    SET name = REPLACE(name, "Wrathful", "Brainless"), Quality = 5
    WHERE name LIKE "Wrathful Gladiator's%";

  4. #4
    thank you both ive used the query of boobler to change the set name anyway how can change ur query to set items to legendary where name is brainless

    UPDATE item_template
    SET Quality = 5
    WHERE name LIKE "Brainless";

    is this it?

  5. #5
    UPDATE item_template
    SET Quality = 5
    WHERE name LIKE "%Brainless%";

  6. #6

  7. #7
    Web Developer

    Join Date
    Oct 2010
    Location
    somewhere between <?php and ?>
    Posts
    3,067

    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Quote Originally Posted by boobler View Post
    UPDATE item_template
    SET Quality = 5
    WHERE name LIKE "%Brainless%";
    That works yeah, Just that there is no need for the first % since there shouldnt be anything before Brainless so "Brainless%" would be the correct way to write it. But well, your query will work

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •