Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $idtor = (int)$_GET['id_tor'];
- $consul = "SELECT id_cantos, id_torneio, id_campeonato, SUM(cantosfim) AS cantfin, SUM(pontos) AS pontfin FROM cantos INNER JOIN campeonato ON id_camp = id_campeonato INNER JOIN torneio ON id_tor = id_torneio WHERE id_tor = :idtor GROUP BY anilha ORDER BY pontfin DESC, cantfin DESC";
- $stmt = $pdo->prepare($consul);
- $stmt->bindParam(':idtor', $idtor);
- $stmt->execute();
- while ($lin = $stmt->fetch(PDO::FETCH_ASSOC)) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement