sql it makes easier

Results 1 to 11 of 11
  1. #1
    Intelligent DoucheBag jur13n is offline
    MemberRank
    Jan 2008 Join Date
    Zwolle,Location
    1,946Posts

    sql it makes easier

    someone can make a sql for me that autopmatical add some items to a char
    so i only have to edit wich cid and item id

    someone can make that for me
    it should be very fine


    already thanks
    jur13n


  2. #2
    Account Upgraded | Title Enabled! shadow-xx is offline
    MemberRank
    Jan 2007 Join Date
    MegatonLocation
    804Posts

    Re: sql it makes easier

    Replace the text thats between the <> including <> to the value it needs

    Inserting item by using cid
    Code:
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<cid>','<itemid>')
    Inserting by using character name
    Code:
    INSERT INTO CharacterItem (CID,ItemID) SELECT CID,'<itemid>' FROM Characters WHERE Name='<character name>'
    Note : Not tested but it should be something like this..

  3. #3
    Intelligent DoucheBag jur13n is offline
    MemberRank
    Jan 2008 Join Date
    Zwolle,Location
    1,946Posts

    Re: sql it makes easier

    ty i really wanted it

  4. #4
    Intelligent DoucheBag jur13n is offline
    MemberRank
    Jan 2008 Join Date
    Zwolle,Location
    1,946Posts

    Re: sql it makes easier

    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<8714>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<1914>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<8713>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<8712>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<8715>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<4234>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<4235>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<4236>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<4237>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<4238>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<1340>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<1337>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<1338>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<1359>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<1339>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<1348>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<1335>')
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('<24>','<1335>')


    i did this _^_
    II
    II
    but it says characteritem is not right what i have to do?
    its my set for gm's

  5. #5
    Account Upgraded | Title Enabled! shadow-xx is offline
    MemberRank
    Jan 2007 Join Date
    MegatonLocation
    804Posts

    Re: sql it makes easier

    They should be separated with a semicolon..
    and also.. the < and > should be removed..


    Like this..
    Code:
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','8714');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','1914');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','8713');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','8712');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','8715');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','4234');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','4235');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','4236');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','4237');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','4238');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','1340');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','1337');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','1338');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','1359');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','1339');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','1348');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','1335');
    INSERT INTO CharacterItem (CID,ItemID) VALUES ('24','1335')

  6. #6
    Intelligent DoucheBag jur13n is offline
    MemberRank
    Jan 2008 Join Date
    Zwolle,Location
    1,946Posts

    Re: sql it makes easier

    it says same:
    Msg 208, Level 16, State 1, Line 1
    Item Name Item Character is invalid

  7. #7
    Account Upgraded | Title Enabled! shadow-xx is offline
    MemberRank
    Jan 2007 Join Date
    MegatonLocation
    804Posts

    Re: sql it makes easier

    They work fine i just tested them

    Some Help..
    - The CID needs to be an existing CID or else i will give errors.
    - Be sure to execute it under the "GunZ Database" and not "master" use the drop down menu to select it
    - Each separate query needs to be ended with a semicolon when using a next query
    - U need to have the right permissions under the account ur connected with to the database

  8. #8
    Intelligent DoucheBag jur13n is offline
    MemberRank
    Jan 2008 Join Date
    Zwolle,Location
    1,946Posts

    Re: sql it makes easier

    ok ty
    didnt know i had to drop down the db

  9. #9
    Status: Pooping eele is offline
    MemberRank
    Jul 2008 Join Date
    The NetherlandsLocation
    915Posts

    Re: sql it makes easier

    Use Admin Panel :O >.<

  10. #10
    Account Upgraded | Title Enabled! 007ruben is offline
    MemberRank
    Jan 2008 Join Date
    netherlandsLocation
    491Posts

    Re: sql it makes easier

    and if the admin panel gives errors?

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

    Re: sql it makes easier

    then either fix them or add them manually. If you dont know how to do that then your screwed (this is the point where you stop trying to do anything with a server)



Advertisement