I want to show highest record id
from mysql database on live. I am using following code and it's working on localhost but not on live site.
<?php
$q ="SELECT LAST_INSERT_ID()";
$result = mysqli_query($q);
$data = mysqli_fetch_array($result);
echo $data[0];
?>