I am trying to get the last id which I entered to my database. Here is the code I use:
$test_query = "SELECT * FROM table ORDER BY id DESC LIMIT 1";
if ( mysql_query($test_query) ) {
echo 'OK!';
$results = mysql_fetch_array($test_query);
echo $results['id'];
print_r ($results);
}
The only output I have is the 'OK!'.
What do i do wrong?