Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1.  
  2. /* Database connection start */
  3. $servername = "localhost";
  4. $username = "root";
  5. $password = "";
  6. $dbname = "blubuk";
  7.  
  8. $conn = mysqli_connect($servername, $username, $password, $dbname) or die("Connection failed: " . mysqli_connect_error());
  9.  
  10. $requestData= $_REQUEST;
  11. $columns = array(
  12. 0 => 'foto_forum',
  13. 1 => 'judul_forum',
  14. 2 => 'name',
  15. 3 => 'waktu'
  16. );
  17.  
  18. // getting total number records without any search
  19. $sql = "SELECT * ";
  20. $sql.=" FROM forum ";
  21. $sql.=" ORDER BY id_forum DESC ";
  22. $query=mysqli_query($conn, $sql) or die("");
  23. $totalData = mysqli_num_rows($query);
  24. $totalFiltered = $totalData; // when there is no search parameter then total number rows = total number filtered rows.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement