And if for some reason you already have a different primary key on the table (why?), then just add an index:
CREATE UNIQUE INDEX gamecode_index ON yourTableName(gamecode);
But I have a question: WHY are you using $tbl_name
in that query?
PLEASE don't tell us that means you have more than one table with this same structure.
If so, odds are 20 to 1 you have a poor database structure.