Skip to main content
deleted 80 characters in body
Source Link
M. Eriksson
  • 13.7k
  • 4
  • 31
  • 42

enter image description here Pastebin codeenter image description here

Code is here on pastebinMy code

[1]: https://pastebin.com/uZtMfuAk  <?php $connect = mysqli_connect("localhost", "root", "password", "dbname"); $query ="SELECT * FROM player ORDER BY unique_id DESC"; $result = mysqli_query($connect, $query); ?> <!DOCTYPE html> <html> <head> <title>Player Data</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> <script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script> <script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script> <link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" /> </head> <body> <br /><br /> <div class="container"> <h3 align="center"> Player Data</h3> <br /> <div class="table-responsive"> <table id="employee_data" class="table table-striped table-bordered"> <thead> <tr> <td>username</td> <td>unique_id</td> </tr> </thead> <?php while($row = mysqli_fetch_array($result)) { echo ' <tr> <td>'.$row["username"].'</td> <td>'.$row["unique_id"].'</td> </tr> '; } ?> </table> </div> </div> </body> </html> <script> $(document).ready(function(){ $('#employee_data').DataTable(); }); </script> 

enter image description here Pastebin code

Code is here on pastebin

[1]: https://pastebin.com/uZtMfuAk  <?php $connect = mysqli_connect("localhost", "root", "password", "dbname"); $query ="SELECT * FROM player ORDER BY unique_id DESC"; $result = mysqli_query($connect, $query); ?> <!DOCTYPE html> <html> <head> <title>Player Data</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> <script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script> <script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script> <link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" /> </head> <body> <br /><br /> <div class="container"> <h3 align="center"> Player Data</h3> <br /> <div class="table-responsive"> <table id="employee_data" class="table table-striped table-bordered"> <thead> <tr> <td>username</td> <td>unique_id</td> </tr> </thead> <?php while($row = mysqli_fetch_array($result)) { echo ' <tr> <td>'.$row["username"].'</td> <td>'.$row["unique_id"].'</td> </tr> '; } ?> </table> </div> </div> </body> </html> <script> $(document).ready(function(){ $('#employee_data').DataTable(); }); </script> 

enter image description here

My code

 <?php $connect = mysqli_connect("localhost", "root", "password", "dbname"); $query ="SELECT * FROM player ORDER BY unique_id DESC"; $result = mysqli_query($connect, $query); ?> <!DOCTYPE html> <html> <head> <title>Player Data</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> <script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script> <script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script> <link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" /> </head> <body> <br /><br /> <div class="container"> <h3 align="center"> Player Data</h3> <br /> <div class="table-responsive"> <table id="employee_data" class="table table-striped table-bordered"> <thead> <tr> <td>username</td> <td>unique_id</td> </tr> </thead> <?php while($row = mysqli_fetch_array($result)) { echo ' <tr> <td>'.$row["username"].'</td> <td>'.$row["unique_id"].'</td> </tr> '; } ?> </table> </div> </div> </body> </html> <script> $(document).ready(function(){ $('#employee_data').DataTable(); }); </script> 
added 2383 characters in body
Source Link

[Pastebin code][1]enter image description here Pastebin code

[1]: https://pastebin.com/uZtMfuAk <?php $connect = mysqli_connect("localhost", "root", "password", "dbname"); $query ="SELECT * FROM player ORDER BY unique_id DESC"; $result = mysqli_query($connect, $query); ?> <!DOCTYPE html> <html> <head> <title>Player Data</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> <script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script> <script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script> <link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" /> </head> <body> <br /><br /> <div class="container"> <h3 align="center"> Player Data</h3> <br /> <div class="table-responsive"> <table id="employee_data" class="table table-striped table-bordered"> <thead> <tr> <td>username</td> <td>unique_id</td> </tr> </thead> <?php while($row = mysqli_fetch_array($result)) { echo ' <tr> <td>'.$row["username"].'</td> <td>'.$row["unique_id"].'</td> </tr> '; } ?> </table> </div> </div> </body> </html> <script> $(document).ready(function(){ $('#employee_data').DataTable(); }); </script> 

[Pastebin code][1]

[1]: https://pastebin.com/uZtMfuAk 

enter image description here Pastebin code

[1]: https://pastebin.com/uZtMfuAk <?php $connect = mysqli_connect("localhost", "root", "password", "dbname"); $query ="SELECT * FROM player ORDER BY unique_id DESC"; $result = mysqli_query($connect, $query); ?> <!DOCTYPE html> <html> <head> <title>Player Data</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> <script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script> <script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script> <link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" /> </head> <body> <br /><br /> <div class="container"> <h3 align="center"> Player Data</h3> <br /> <div class="table-responsive"> <table id="employee_data" class="table table-striped table-bordered"> <thead> <tr> <td>username</td> <td>unique_id</td> </tr> </thead> <?php while($row = mysqli_fetch_array($result)) { echo ' <tr> <td>'.$row["username"].'</td> <td>'.$row["unique_id"].'</td> </tr> '; } ?> </table> </div> </div> </body> </html> <script> $(document).ready(function(){ $('#employee_data').DataTable(); }); </script> 
Source Link

Display records/table from mysql. Issue

I want display data from mysql on my php page . Everything works well but...

I have two tables . Players and Combat .

On players I gave username,unique_id

On combat I have unique_id , kills , deaths .

I want split connect these two tables and display them using this code/table

[Pastebin code][1]

Code is here on pastebin

[1]: https://pastebin.com/uZtMfuAk