Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. <?php
  2. $SQL = "SELECT m.MatchID AS id, t1.TeamName AS team1, t2.TeamName AS team2 , d1.GameStart AS gamestart , d2.GameEnd AS gameend
  3. FROM Matches m
  4. JOIN TeamTable t1 ON m.Team1 = t1.TeamID
  5. JOIN TeamTable t2 ON m.Team2 = t2.TeamID
  6. WHERE GameName = 2 , gameend < CURDATE()
  7. ORDER BY MatchID DESC
  8. LIMIT 10";
  9. //ORDER BY MatchID DESC";
  10. $r = mysql_query($SQL); ?>
  11. <div class="col-sm-2">
  12. <table class="table table-striped">
  13. <thead>
  14. <tr>
  15. <th>Team One</th>
  16. <th>Team Two</th>
  17. <th>Make a Bet!</th>
  18. </tr>
  19. </thead>
  20. <tbody>
  21. <?php while($match = mysql_fetch_assoc($r)): ?>
  22. <tr>
  23. <td><?php echo $match['team1']; ?></td>
  24. <td><?php echo $match['team2']; ?></td>
  25. <td><a class="btn btn-default" href="Usrbet2.php?match_id=<?php echo $match['id']?>">Bet!</a></td>
  26. </tr>
  27. <?php endwhile; ?>
  28. </tbody>
  29. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement