Changing the Ranking Column in DB.
I just realized that my Ranking column in the Character table has ranks of all the characters set to 1 but my website's ranking page shows the ranks properly maybe because of the script.
They all got set to 1 / started getting set to 1 after I tried No Life X's MPOG web once, where we had to execute the following script:
Code:
/*
September 10 200918:52:52
User: Nolife_x
Server: PC-DE-GERRY\SQLEXPRESS
Database: GunZDB
Application: Fix the player ranking page.
*/
/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
ALTER TABLE dbo.Character ADD
Ranking int NULL
GO
ALTER TABLE dbo.Character ADD CONSTRAINT
DF_Character_Ranking DEFAULT 1 FOR Ranking
GO
COMMIT
I'm guessing it's somewhere in the red part. I could change the column and make it number the characters' ranking in increasing order but that wouldn't be the actual rank.
So how do I change to column back to normal so that the Ranking column shows proper ranks of all the characters?
Please help me out, I have no clue on how to do it and really need to fix it.
Thanks.
Re: Changing the Ranking Column in DB.
the script Saved my ass =)
Re: Changing the Ranking Column in DB.
well, your ranking system probably has nothing to do with the ranking column. I'm pretty sure you could probably just delete it, but check your ranking scripts to see if it uses it before you do.
4,000th post :P
Re: Changing the Ranking Column in DB.
Congrats :)
Yeah, the script probably just uses the kill/death columns in your database and ranks them based on the total score. Or probably experience, who knows look through the script.
Re: Changing the Ranking Column in DB.
Quote:
Originally Posted by
Hymn
Congrats :)
Yeah, the script probably just uses the kill/death columns in your database and ranks them based on the total score. Or probably experience, who knows look through the script.
exactly what I was thinking, but you never know. I think one of the webs got the ranking from the experience table then updated the ranking column accordingly, but I'm not sure lol. Thanks too.
Re: Changing the Ranking Column in DB.
Quote:
Originally Posted by
wesman2232
exactly what I was thinking, but you never know. I think one of the webs got the ranking from the experience table then updated the ranking column accordingly, but I'm not sure lol. Thanks too.
Heh that would be more high speed than I could figure gunz developers would think about.
Re: Changing the Ranking Column in DB.
Congrats wesman, and gj Phoenix.
Re: Changing the Ranking Column in DB.
I've changed the ranking page so that it arranges the characters by their Exp, so it's in perfect order.
But the player info script / in-game Ranking (08 files) reads the ranking from the Character table's ranking column, and hence I need a fix for it.
Re: Changing the Ranking Column in DB.
hmm, well you could try changing the script to have the default ranking to be null.
Re: Changing the Ranking Column in DB.
Yeah I wanted to undo the script. I'm not sure how exactly I can do it.
Re: Changing the Ranking Column in DB.
Code:
GO
ALTER TABLE dbo.Character DROP CONSTRAINT DF_Character_Ranking
GO
UPDATE Character SET Ranking = NULL
Give it a try.
Re: Changing the Ranking Column in DB.
Quote:
Originally Posted by
Linear88
Code:
GO
ALTER TABLE dbo.Character DROP CONSTRAINT DF_Character_Ranking
Give it a try.
I executed it but the ranking of all characters is still '1' in the Ranking column. Do I have to log into those accounts and select the characters or create new ones to check?
Re: Changing the Ranking Column in DB.
Re: Changing the Ranking Column in DB.
It set the ranks of existing characters to 'NULL' and even new characters are set to 'NULL' regardless of the kills they make and level up.