I used the query:
$sql = mysql_query("SELECT MAX(eno) FROM employee");
Which retrieve last record from database, but it is not working with while loop. If I used:
$sql = mysql_query("SELECT * FROM employee");
This query then the while loop runs properly. Why does this happen?
$sql = mysql_query("SELECT MAX(eno) FROM employee");
while ($row = mysql_fetch_assoc($sql)) {
$asd = $row['eno'];
echo "eno".$asd;
}