I want to create a table that will output the data from mysql database that was recently added.
Example :
+-----+---------+-----------+---------------+-------------+
| id | item_id | item_name | borrowed_date | expiry_date |
+-----+---------+-----------+---------------+-------------+
| B01 | N01 | book | 12/05/2017 | 10/06/2017 |
+-----+---------+-----------+---------------+-------------+
I have tried using ORDER BY but it does not output according to newly added row.
<?php
include"connection.php"; //contain $conn
$query = "SELECT * FROM `database` ORDER BY item_id ASC ;";
$result = mysqli_query($conn,$query);
?>
The output was not according to newly added data