Difference between revisions of "How to unvalidate a highscore"

From X-Moto
Jump to: navigation, search
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
*You need access to the website database
 
*You need access to the website database
*find the level, set numberUpdates to numberUpdates-1
+
*find the level, set nb_times_updated to nb_times_updated-1
   SELECT * FROM levels WHERE name LIKE '%level%name%';
+
   SELECT id,name,nb_times_updated FROM levels WHERE name LIKE '%level%name%';
 +
  update levels set nb_times_updated=nb_times_updated-1 where id=<id_level from the previous query>
 
*find the highscore, set enabled to 0, validated to 0
 
*find the highscore, set enabled to 0, validated to 0
 
  SELECT * FROM highscores WHERE id_room=1 AND id_level=<id_level from the previous query>
 
  SELECT * FROM highscores WHERE id_room=1 AND id_level=<id_level from the previous query>
 +
update highscores set validated=0, enabled=0 where id=xxx;
 
*find the previous highscore, set enabled to 1
 
*find the previous highscore, set enabled to 1
 
  SELECT * FROM highscores WHERE id_room=1 AND id_level=<id_level from the previous query>
 
  SELECT * FROM highscores WHERE id_room=1 AND id_level=<id_level from the previous query>
 +
update highscores set validated=1, enabled=1 where id=xxx;
 
*delete the line in wr_history
 
*delete the line in wr_history
 
   SELECT * FROM wr_history WHERE id_room=1 AND id_level=<id_level from the previous query>
 
   SELECT * FROM wr_history WHERE id_room=1 AND id_level=<id_level from the previous query>
 +
  delete from wr_history where id=xxx;
 
*regenerate the rss and the highscore's xml
 
*regenerate the rss and the highscore's xml

Latest revision as of 17:58, 31 October 2008

  • You need access to the website database
  • find the level, set nb_times_updated to nb_times_updated-1
 SELECT id,name,nb_times_updated FROM levels WHERE name LIKE '%level%name%';
 update levels set nb_times_updated=nb_times_updated-1 where id=<id_level from the previous query>
  • find the highscore, set enabled to 0, validated to 0
SELECT * FROM highscores WHERE id_room=1 AND id_level=<id_level from the previous query>
update highscores set validated=0, enabled=0 where id=xxx;
  • find the previous highscore, set enabled to 1
SELECT * FROM highscores WHERE id_room=1 AND id_level=<id_level from the previous query>
update highscores set validated=1, enabled=1 where id=xxx;
  • delete the line in wr_history
 SELECT * FROM wr_history WHERE id_room=1 AND id_level=<id_level from the previous query>
 delete from wr_history where id=xxx;
  • regenerate the rss and the highscore's xml