All pastes #184821 Raw Edit

Anonymous

public php v1 · immutable
#184821 ·published 2006-09-28 10:01 UTC
rendered paste body
exmaple of database:statisticsentry_id   player_id  entry_tc_age1          1          102          2          123          1          94          1          485          3          12playerplayer_id  player_name1          john2          bob3          billWhat i want returned:entry_id  player_name  entry_tc_age5          bill        124          john        482          bob         12  $display_unique = "SELECT statistics.*,  player.player_name  FROM statistics,  player  WHERE statistics.player_id = player.player_id  ORDER BY statistics.entry_id DESC";  $query_unique=@mysql_query($display_unique,$dbac);  if (!$query_unique) {    echo 'Error';  };  while ($result_unique[] = mysql_fetch_array($query_unique));  array_pop($result_unique);  $result_unique = array_unique(result_unique);  foreach ($result_unique as $value) {    echo $value['entry_id'];    echo $value['player_name'];    echo $value['entry_tc_age'];  }