[Request] Some Queries...

Results 1 to 7 of 7
  1. #1
    Music<3 Katsuro is offline
    MemberRank
    Oct 2006 Join Date
    Kailua-Kona, HILocation
    1,051Posts

    [Request] Some Queries...

    Hello,

    I was wondering if someone could make a quick querie for me that would do the following
    1. Do a Inventory Wipe on All Char's.
    2. Set everyone's level to One.

    I would try to learn myself but I don't really want to mess up my database right now. ;3
    Thanks in Advance.

    Regards,
    ~Katsuro


  2. #2
    DRGunZ 2 Creator wesman2232 is offline
    MemberRank
    Jan 2007 Join Date
    Erie, PALocation
    4,872Posts

    Re: [Request] Some Queries...

    umm you might have to do it all by one, i don't know if you can do every single one xD though my php knowledge isn't that great.
    Lets see...
    Inventory wipe:
    Code:
    DELETE * FROM Item WHERE AID =?
    that might be Items :P
    Set level to one:
    Code:
    UPDATE * FROM Character WHERE AID =? SET Level = 1
    might be Characters :P
    They might not work but they seem right :P
    Hope I helped.

  3. #3
    Music<3 Katsuro is offline
    MemberRank
    Oct 2006 Join Date
    Kailua-Kona, HILocation
    1,051Posts

    Re: [Request] Some Queries...

    Cant you do something like:

    Code:
     UPDATE * FROM Character WHERE level < '99'
    Lol, Don't mind if that would be a failure. No experience in SQL Queries.
    But, Its supposed to be Update the Char table and set level 1 where level is less then 99.
    Would that work or not?

    As for the Inventory Wipe, Would this work?

    Code:
    DELETE FROM CharacterItem

  4. #4
    Account Upgraded | Title Enabled! Mr.Lucifer is offline
    MemberRank
    Apr 2007 Join Date
    797Posts

    Re: [Request] Some Queries...

    Backup your database first.

    The first query is good as long as no one is exactly lvl 99 I believe, but the second query wont work.

    Edit: Disregard that.
    Last edited by Mr.Lucifer; 07-01-09 at 07:42 AM.

  5. #5
    Programming Addict Lambda is offline
    MemberRank
    Sep 2007 Join Date
    SpainLocation
    393Posts

    Re: [Request] Some Queries...

    Delete items in inventory.

    DELETE FROM CharacterItem
    Sets all players level to 1

    UPDATE Character SET Level = 1

  6. #6
    Music<3 Katsuro is offline
    MemberRank
    Oct 2006 Join Date
    Kailua-Kona, HILocation
    1,051Posts

    Re: [Request] Some Queries...

    Ah, I thought I was close.
    Thanks Lambda.

  7. #7
    DRGunZ 2 Creator wesman2232 is offline
    MemberRank
    Jan 2007 Join Date
    Erie, PALocation
    4,872Posts

    Re: [Request] Some Queries...

    Quote Originally Posted by Lambda View Post
    Delete items in inventory.



    Sets all players level to 1
    rofl thanks, I didnt realize you could do every single one with just one query xD



Advertisement