I want to know how to retrieve the details of the best shop to a table in html page. The fields of my SQL database are shop_id, shop_name, shop_Tp, shop_addr, shop_sales, shop_rank
Please help me with this.
Please help me to show this result in a table (Tabular format - ID, Name, Telephone, Address, Sales, Ranking)
My Code
<?php
$con=mysqli_connect("localhost", "root", "osanda92", "test_db");
$mysql="SELECT * FROM shop ORDER BY shop_rank LIMIT 1";
$result=mysqli_query($con,$mysql);
while($row = mysqli_fetch_array($result))
{
echo $row['shop_id']."</br>".$row['shop_name']."</br>".$row['shop_Tp']."</br>".$row['shop_addr']."</br>".$row['shop_sales']."</br>".$row['shop_rank']."</br></br></br>";
}
mysqli_close($con);
?>