Jump to content

How would i?


killah

Recommended Posts

How would i go by doing something like this.

 

I got a forum system, i want to integrate a karma system. I don't want 2 fields for the karma like. karma_minus & karma_plus. I would like it to be karma.

 

But i want it to display like

 

Karma: +karma / -karma

 

How ever i was thinking of maybe doing it like this

 

+karma;-karma

 

When updating i explode it to be like

 

Giving plus karma:

$karm = explode(';',$user['karma']);

$curn = ($karm[0] + 1);

mysql_query("UPDATE users SET karma = '".$curn.";".$karm[1]."' WHERE user=1");

 

Would that work?

Link to comment
https://forums.phpfreaks.com/topic/147539-how-would-i/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.