News:

Wondering if this will always be free?  See why free is better.

Main Menu

How do I reset karma?

Started by Rem Nightfall, October 08, 2010, 03:28:46 AM

Previous topic - Next topic

Rem Nightfall

How do I reset everything to 0 karma again?

Oya

assuming you want to totally reset everyone's karma to 0 regardless of groups

update smf_members set karma_good = 0, karma_bad = 0

Rem Nightfall

What do you mean by
"
update smf_members set karma_good = 0, karma_bad = 0"

Oya

thats the query you have to run in phpmyadmin to fix it

xenovanis

"Insanity: doing the same thing over and over again and expecting different results."

IceXaos

You could also use a PHP script if you wished.

IceXaos

Pretty sure you can't get lost from here.

<?php

$host 
'localhost';
$user 'username';
$pass 'password';
$database 'database';

$db mysql_connect($host$user$pass) or die ("Database error");
mysql_select_db($database$db);

$result mysql_query("update smf_members set karma_good = 0, karma_bad = 0");
if (!
$result)
    die (
'Invalid MySQL Query: ' mysql_error());

mysql_close();

?>

Alex' Manson

---off-topic---
Quote from: IceXaos on October 08, 2010, 12:38:46 PM
Pretty sure you can't get lost from here.

<?php

$host 
'localhost';
$user 'username';
$pass 'password';
$database 'database';

$db mysql_connect($host$user$pass) or die ("Database error");
mysql_select_db($database$db);

$result mysql_query("update smf_members set karma_good = 0, karma_bad = 0");
if (!
$result)
    die (
'Invalid MySQL Query: ' mysql_error());

mysql_close();

?>

the genius talked! ;)
can you teach me some php ice? :P
PM ME

Rem Nightfall

Okay I got phpMyAdmin

When I go into it, it shows these:
    Databases
    SQL
    Status
    Variables
    Charsets
    Engines
    Processes
    Export
    Import


Which one do I put "update smf_members set karma_good = 0, karma_bad = 0"" in.

Oya

select databases
select the name of your forum's database
select sql
paste that code in

Rem Nightfall

I got "#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"' at line 1"


EDIT:

Never mind it worked thanks so much ;D

xenovanis

Congratulations Rem, on running your first MySQL query  ;)
"Insanity: doing the same thing over and over again and expecting different results."

Advertisement: