Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate map listings #2

Open
sneak-it opened this issue Sep 17, 2021 · 1 comment
Open

Duplicate map listings #2

sneak-it opened this issue Sep 17, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@sneak-it
Copy link
Member

If 2 players tie a record, the map is listed twice in the map list.

image

@sneak-it sneak-it added the bug Something isn't working label Sep 17, 2021
@glassglue
Copy link

glassglue commented Sep 20, 2021

if this is related to view_maps.php in specific retaining a local php value of the last called map's name and checking that to next parsed name in an if statement will negate the problem most likely without refactoring a lot of the original code

if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        if ($current_map != $row["mapname"]){
            $current_map = $row["mapname"];
		$result_tier = $conn->query("SELECT tier FROM $database_call_2 WHERE mapname='$current_map' limit 1");
		$value = mysqli_fetch_object($result_tier);
		$this_map_tier = $value->tier;
        echo "<tr><td><a href='?view=map&name=".$row["mapname"]."'>".$row["mapname"]."</a></td><td>$this_map_tier</td><td><i class=\"fa fa-clock-o\" aria-hidden=\"true\"></i> ".processFloat($row["runtimepro"])."</td><td><a href='?view=profile&id=".$row["steamid"]."'>".$row["name"]."</a></td></tr>";
}
        }
		
    }
} 

maybe something like this? don't even know if i'm looking at the right thing tbh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants