Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. <?php
  2. $sql = "SELECT COUNT ID FROM out_fact";
  3. $query = mysql_query($sql);
  4. $result = mysql_fetch_row($query);
  5. $total_records = $result[0];
  6. $total_pages = ceil($total_records / 20);
  7.  
  8. for ($i=1; $i<=$total_pages; $i++) {
  9. echo "<a href='view.php?page=".$i."'>".$i."</a> ";
  10. };
  11. ?>
  12.  
  13. $sql = "SELECT COUNT(ID) FROM out_fact";
  14.  
  15. SELECT COUNT(ID) FROM out_fact
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement