I'm working on displaying the achievements from my minecraft server on my website. But I can't get it to work.
function achievements() {
global $id;
$sql="SELECT * FROM achievements
INNER JOIN stats ON achievements.type=stats.type
INNER JOIN stats ON achievements.block=stats.block
INNER JOIN stats ON achievements.data=stats.data
INNER JOIN stats ON achievements.value=stats.value
WHERE player_id = $id";
$result=mysql_query($sql) or die(mysql_error());
$rows=mysql_fetch_array($result);
}
Will I be able to use $rows['achievements.type'];
and $rows['stats.type'];
to get the column "type" from the selected table, or is there a another way to do it?
The column and table names are defined by the plugin I use, so the names can't be changed.