Mysql item_templates (need help) menu

User Tag List

Results 1 to 4 of 4
  1. #1
    bergis1337's Avatar Member
    Reputation
    1
    Join Date
    May 2008
    Posts
    23
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mysql item_templates (need help)

    hello i jusst wrote an item sql code that would make it easyer for me to remove all the buyprice/sell price from the items ids that ive looked up instead of looking trough all pages in item_templates. heres the thing. when i execute the file it says sucess but when i restart server and login , the prices are still there on the items, also tried to delete the cache folder.

    heres the code, can somebody tell me what im doing wrong here please?

    Code:
    UPDATE item_template SET buyprice = 0 WHERE `entry`=23197 AND 27518 AND 22398 AND 22397 AND 23203 AND 22401 AND 22400 AND 22395 AND 22345 AND 23199 AND 22329 AND 11928 AND 23139 AND 22336 AND 19915 AND 18696 AND 13375 AND 14528 AND 13529 AND 18485 AND 18499 AND 14002 AND 13243 AND 20695 AND 22268 AND 13164 AND 11811 AND 13966 AND 13968 AND 13965 AND 13379 AND 18522 AND 22339 AND 21187



    Code:
    UPDATE item_template SET sellprice = 0 WHERE `entry`=23201 AND 27518 AND 22398 AND 22397 AND 23203 AND 22401 AND 22400 AND 22395 AND 22345 AND 23199 AND 22329 AND 11928 AND 23139 AND 22336 AND 19915 AND 18696 AND 13375 AND 14528 AND 13529 AND 18485 AND 18499 AND 14002 AND 13243 AND 20695 AND 22268 AND 13164 AND 11811 AND 13966 AND 13968 AND 13965 AND 13379 AND 18522 AND 22339 AND 21187

    Mysql item_templates (need help)
  2. #2
    secretdragon008's Avatar Member
    Reputation
    43
    Join Date
    Sep 2007
    Posts
    217
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your function "AND" in the Query don't work.
    It will only update your first entry near the =.

    You need to make 1 line of code each entry you want, for it to work.

    like this:
    UPDATE item_template SET buyprice = 0 WHERE `entry`=23197;
    UPDATE item_template SET buyprice = 0 WHERE `entry`=27518;

    I hope it helped.

  3. #3
    Chrispl57's Avatar Corporal
    Reputation
    12
    Join Date
    Jun 2010
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use commas instead of and try this


    UPDATE item_template SET `buyprice` = 0, `sellprice` = 0 WHERE `entry`=23197, 27518, 22398, 22397, 23203, 22401, 22400, 22395, 22345, 23199, 22329, 11928, 23139, 22336, 19915, 18696, 13375, 14528, 13529, 18485, 18499, 14002, 13243, 20695, 22268, 13164, 11811, 13966, 13968, 13965, 13379, 18522, 22339, 21187;

  4. #4
    bergis1337's Avatar Member
    Reputation
    1
    Join Date
    May 2008
    Posts
    23
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm

    chrispl57:
    [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 27518, 22398, 22397, 23203, 22401, 22400, 22395, 22345, 23199, 22329, 11928, 23' at line 1
    [Err] UPDATE item_template SET `buyprice` = 0, `sellprice` = 0 WHERE `entry`=23197, 27518, 22398, 22397, 23203, 22401, 22400, 22395, 22345, 23199, 22329, 11928, 23139, 22336, 19915, 18696, 13375, 14528, 13529, 18485, 18499, 14002, 13243, 20695, 22268, 13164, 11811, 13966, 13968, 13965, 13379, 18522, 22339, 21187;
    [Msg] Finished - Unsuccessfully
    that happend with your code

    secretdragon008, thanks yours worked great, +rep, also i changed it abit

    UPDATE item_template SET `buyprice` = 0, `sellprice` = 0 WHERE `entry`=34470;
    UPDATE item_template SET `buyprice` = 0, `sellprice` = 0 WHERE `entry`=34471;
    UPDATE item_template SET `buyprice` = 0, `sellprice` = 0 WHERE `entry`=34472;
    UPDATE item_template SET `buyprice` = 0, `sellprice` = 0 WHERE `entry`=34473;
    UPDATE item_template SET `buyprice` = 0, `sellprice` = 0 WHERE `entry`=34475;
    UPDATE item_template SET `buyprice` = 0, `sellprice` = 0 WHERE `entry`=34477;
    Last edited by bergis1337; 06-11-2010 at 02:01 AM.

Similar Threads

  1. Replies: 1
    Last Post: 03-22-2009, 03:48 AM
  2. [NEED-HELP] MySQL problem
    By slakt in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 12-26-2008, 04:42 PM
  3. [MYSQL problem] to big of a DB need help
    By jmulhern345 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 07-04-2008, 03:51 PM
  4. Ascent/LogOnServer/MySQL - Error message - Need help!
    By Habakka in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 02-21-2008, 12:56 PM
  5. Need Help, MySQL Error
    By Maree in forum WoW EMU Guides & Tutorials
    Replies: 1
    Last Post: 01-27-2008, 06:45 PM
All times are GMT -5. The time now is 08:20 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search