Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => SMF Feedback and Discussion => Aiheen aloitti: Awesom - lokakuu 08, 2007, 07:12:04 AP

Otsikko: Karma Default Amount
Kirjoitti: Awesom - lokakuu 08, 2007, 07:12:04 AP
OK well... I want to make it so everyone starts off with 10 karma instead of 0. I was told by someone to go to phpmyadmin and change it I did this (I think correctly) and I get an error and it doesn't work.

Here is screenshot on what happens.


(http://img158.imageshack.us/my.php?image=karmaerrorii6.png)


If you couldnt see this is the error after doing it

" MySQL Error:
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 'unsigne) NOT NULL DEFAULT '10'' at line 1"

Thanks.
Otsikko: Re: Karma Default Amount
Kirjoitti: codenaught - lokakuu 08, 2007, 11:14:01 AP
I believe what you are trying to do would only work for future members however?

I think your problem is it says "unsigne" when it should say "unsigned" under the Value field.

If you want to do this for all current members you could do something like:

UPDATE smf_members SET karmaGood = 10 WHERE karmaGood < 10

Otsikko: Re: Karma Default Amount
Kirjoitti: Awesom - lokakuu 08, 2007, 07:09:18 IP
Thanks for reply.

Hmm it seems to say "unsigne" for all of the values and I have not edited it before. =/

Where would I add that code?
Otsikko: Re: Karma Default Amount
Kirjoitti: codenaught - lokakuu 08, 2007, 07:14:52 IP
I realized that you probably didn't change the "unsigne" bit yourself, though I thought maybe if you manually added the "d" at the end it would work.

That code I posted can be entered into the box that appears after clicking the "SQL" tab inside of phpmyadmin. (With the right database selected)
Otsikko: Re: Karma Default Amount
Kirjoitti: Awesom - lokakuu 08, 2007, 07:17:56 IP
I'm confused when I look at it in the list it is is "unsigned" then when I click change it just appears as "unsigne" before I have even touched anything.

(http://img504.imageshack.us/my.php?image=weirdcv9.png)

Cheers.


Otsikko: Re: Karma Default Amount
Kirjoitti: Awesom - lokakuu 08, 2007, 07:18:57 IP
LainaaI realized that you probably didn't change the "unsigne" bit yourself, though I thought maybe if you manually added the "d" at the end it would work.

Just before I saw this post I tried that after seeing your first :P but I still got the same error.
Otsikko: Re: Karma Default Amount
Kirjoitti: Awesom - lokakuu 08, 2007, 07:27:43 IP
Lainaa
That code I posted can be entered into the box that appears after clicking the "SQL" tab inside of phpmyadmin. (With the right database selected)

I don't see any SQL Tab. Sorry I am pretty new to php and SQL could you possibly get a screen shot of this ?
Otsikko: Re: Karma Default Amount
Kirjoitti: codenaught - lokakuu 08, 2007, 07:38:06 IP
See, it is the second tab on the page when viewing the tables in a database.

As for setting the default value to 10 for all future members, there is an alternative way that you can use that involves editing some code that I can give you.
Otsikko: Re: Karma Default Amount
Kirjoitti: Awesom - lokakuu 08, 2007, 07:44:45 IP
My phpmyadmin looks alot different it does not have those above tabs =/

(http://img413.imageshack.us/my.php?image=14448105pt7.png)

LainaaAs for setting the default value to 10 for all future members, there is an alternative way that you can use that involves editing some code that I can give you.

I may have to try this ?

Otsikko: Re: Karma Default Amount
Kirjoitti: Awesom - lokakuu 10, 2007, 05:00:57 AP
akabugeyes I am wondering if you can help me with the code you mentioned. ?