Hello guys!
I have a MySQL table with fields ID, TEAM_NAME, TEAM_POINTS.
I have a php page with a league table and i need to retrieve these data from the MySQL table so that the team with the most TEAM_POINTS to get 1st position and so on.
Can anyone help me on the code for this?// do you database connections here
// do query
$result = mysql_query("select * from table order by TEAM_POINTS ASC");
while ($row = mysql_fetch_array($result)){
echo $row['ID'];
echo $row['TEAM_NAME'];
echo $row['TEAM_POINTS'];
}
not difficult if you read a little. of course you can make it dispaly in a table too.
I have a MySQL table with fields ID, TEAM_NAME, TEAM_POINTS.
I have a php page with a league table and i need to retrieve these data from the MySQL table so that the team with the most TEAM_POINTS to get 1st position and so on.
Can anyone help me on the code for this?// do you database connections here
// do query
$result = mysql_query("select * from table order by TEAM_POINTS ASC");
while ($row = mysql_fetch_array($result)){
echo $row['ID'];
echo $row['TEAM_NAME'];
echo $row['TEAM_POINTS'];
}
not difficult if you read a little. of course you can make it dispaly in a table too.