Jay2391 Posted February 4, 2007 Share Posted February 4, 2007 I am trying to give numbers to these field but they only give the last number ... I have 4 recorsd so I only get the 4 all the other records stay at Zero why is that when i echo I can see the 1 2 3 and 4 $query_rr1 = "SELECT * FROM $tabler WHERE (tourney_name=\"$tourney_name\") ORDER BY 'ran_rank' "; $result_rr1 = mysql_query($query_rr1, $tc); while($row_rr1 = mysql_fetch_array($result_rr1)){ $player_id1 = $row_rr1['result_id']; $rank_c ++; echo"<br>$player_id1"; echo"<br>$rank_c"; $change_rr1 = "UPDATE $tabler SET rank='$rank_c' WHERE (result_id=\"$player_id\")"; mysql_query($change_rr1) or die ("Cannot Update Table". mysql_error()); } Link to comment https://forums.phpfreaks.com/topic/37059-update-table-with-count/ Share on other sites More sharing options...
Jay2391 Posted February 4, 2007 Author Share Posted February 4, 2007 for grt it wrong variable Link to comment https://forums.phpfreaks.com/topic/37059-update-table-with-count/#findComment-176971 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.