change code to display only a single table from sql

Hi All. I have code that pulls from a sql database and shows up like this:
6 Jim Pappalardo - pappajim 1565
7 Allen Stallman - Buddha 1515
8 Justine Gentile - Jj725 149

the first name is the persons name, the second name is the “id”. I want it to show only the “id” with the score at the end. I was able to get the printed results to work like this, but this recalled directly and I can not get it right. below is the page that recalls it. Ive tried to delete refference to the name but it deletes all info: Thanks Clint

require ( “includes/config.php” );
require ( “includes/CGI.php” );
require ( “includes/SQL.php” );

$cgi = new CGI ();
$sql = new SQL ( $DBusername, $DBpassword, $server, $database );

if ( ! $sql->isConnected () )
{
die ( $DatabaseError );
}

// Get the poker league information
$lrows = $sql->execute ( "SELECT * FROM " . $admin_table . “”,
SQL_RETURN_ASSOC );
$lrow = $lrows [ 0 ];
?>

Select tournament to see results.. <?PHP $result = mysql_db_query($database, "SELECT * FROM " . $tournament_table . " ORDER BY id DESC") or die ("$DatabaseError"); while ( $qry = mysql_fetch_array($result)) { echo "getValue ( "tournamentid" ) . ""){echo " selected";} echo ">$qry[tournament_name]"; } ?>

  


<?php // Show the individual tournament information if ( $cgi->getValue ( "op" ) == "showtournament" ) { $trows = $sql->execute ( "SELECT * FROM " . $tournament_table . " WHERE tournamentid = " . $sql->quote ( $cgi->getValue ( "tournamentid" ) ) . " LIMIT 1", SQL_RETURN_ASSOC ); $trow = $trows [ 0 ]; echo "

 $trow[tournament_name]  

Tournament ID: $trow[tournamentid]
Date of Tournament: $trow[tournament_date]

"; echo "

Poker Tournament Results for $trow[tournament_date]

"; // Get the acutal player results for the tournament { $rows = $sql->execute ( "SELECT playerid,SUM(points) AS points FROM ".$score_table." WHERE tournamentid = '" . $cgi->getValue ( "tournamentid" ) . "' GROUP BY playerid ORDER BY points DESC", SQL_RETURN_ASSOC ) or die ("$DatabaseError"); echo ""; $num = sizeof ( $rows ); for ( $i = 0; $i < $num; ++$i ) { $points = $rows [ $i ] [ "points" ]; $playerid = $rows [ $i ] [ "playerid" ]; $pos = $i + 1; echo ""; } echo "
Pos. Player Points
$pos "; $prows = $sql->execute ( "SELECT * FROM ".$player_table." WHERE playerid='$playerid'", SQL_RETURN_ASSOC ); $prow = $prows [ 0 ]; if ($prow['profile']) { echo "$prow[name]"; } else { echo "$prow[name]"; } echo" - $playerid $points
"; } } // Show the player information bio elseif ( $cgi->getValue ( "op" ) == "showplayer" ) { echo ""; echo ""; echo ""; echo "
Player Profiles

"; { $rows = $sql->execute ( "SELECT * FROM ".$player_table." ORDER BY name ASC", SQL_RETURN_ASSOC ); $num = sizeof ( $rows ); for ( $i = 0; $i < $num; ++$i ) { $playerid = $rows [ $i ] [ "playerid" ]; $playername = $rows [ $i ] [ "name" ]; echo "
  • $playername
  • "; } } echo "
    "; // Select the player bio from the database based on the name searched for... $plrows = $sql->execute ( "SELECT * FROM ".$player_table." WHERE playerid='" . $cgi->getValue ( "pid" ) . "'", SQL_RETURN_ASSOC ); $plrow = $plrows [ 0 ]; echo "

    $plrow[name]

    '$plrow[playerid]'

    "; if ($plrow['profile']) {echo "".nl2br($plrow['profile'])."

    ";} if ($plrow['team']) {echo "Team Name $plrow[team]
    ";} if ($plrow['websiteurl']) {echo "Website: $plrow[websiteurl]
    ";} echo "

    "; echo "
    "; } ?>


    Sponsor our Newsletter | Privacy Policy | Terms of Service