Page 1 of 1

Show Class in User profile

Posted: Mon Mar 10, 2014 5:55 pm
by cyborg
I'm trying add the players class in the user profile, at the moment i just get the number, how do I link value to user_class.id?

this is my code so far

Code: Select all

	// adds players class
	$result = $db->Execute("select variable_id,value from user_variables where variable_id = 12 and user_id = ?", $_GET["id"]);
       if ($result->EOF)
        echo "<td>" . Translate("None Selected") . "</td></tr>";
    else
        echo "<tr><td width='1%'><b>" . str_replace(" ", " ", Translate("Class")) . ":</b></td>";
        echo "<td>{$result->fields[1]}</td></tr>";
    $result->Close();

Re: Show Class in User profile

Posted: Mon Mar 10, 2014 5:57 pm
by a_bertrand
Check out the user_class table (as defined in the player_class module). That should give you the info you are lacking.

Re: Show Class in User profile

Posted: Mon Mar 10, 2014 8:05 pm
by cyborg
Thanks I think I got it working finally :)