Latest Diablo 3 News
DiabloWiki Updates
Support the site! Become a Diablo: IncGamers PAL - Remove ads and more!

Sql Help!

Discussion in 'Off-Topic' started by Dracoy, Apr 4, 2005.

  1. Dracoy

    Dracoy IncGamers Member

    Joined:
    Jun 22, 2003
    Messages:
    2,209
    Likes Received:
    0
    Trophy Points:
    466
    Sql Help!

    Code:
    mySQL query error: INSERT INTO ibf_games_list
            			(gname,gwords,gtitle,bgcolor,gwidth,gheight,active,object,gkeys,gcat,added,highscore_type) VALUES
                        ('mahjong','','Mah Jong',000,400,400,1,'','',1,1112646734,'high')
    
    mySQL error: Duplicate entry '127' for key 1
    mySQL error code: 
    Date: Monday 04th of April 2005 01:32:14 PM
    Does anyone know how to add another key or something? I checked there is no duplicaate entry probably using the keys or something ><
     
  2. kryo

    kryo IncGamers Member

    Joined:
    Jan 26, 2004
    Messages:
    299
    Likes Received:
    0
    Trophy Points:
    42
    If you've got auto_increment set on a small key field (for example, a signed TINYINT would yeild a maximum value of 127, so that's probably what you've got), you'll run into problems like that.

    You should be able to fix it by simply changing the problem key to something larger, like INT(11).
     
  3. Dracoy

    Dracoy IncGamers Member

    Joined:
    Jun 22, 2003
    Messages:
    2,209
    Likes Received:
    0
    Trophy Points:
    466
    Where would i find this TINYINT?
    Found it how do i change it in mysql manager?
     
  4. kryo

    kryo IncGamers Member

    Joined:
    Jan 26, 2004
    Messages:
    299
    Likes Received:
    0
    Trophy Points:
    42
    Not sure of the specifics of the frontend you use, but it should be as simple as executing a command to the effect of "ALTER TABLE [table name] MODIFY [field name] INT(11);", if I recall the syntax.
     

Share This Page