How do I find second highest value from a table?
<?php
$query = mysql_query("SELECT number FROM table ORDER BY number DESC LIMIT 2");
$second_highest = mysql_result($query,1,0);
echo "the answer to your question is $second_highest";
?>
And that's really all that there is to it... thanks for submitting your question!
More mysql PHP Questions
How do I find the longest value in my mysql table?How do I include a conditional in my mysql query?
How do I find the ID of a new row added to a table?
How do I return a random row from the database?
How do I set a default value for ENUM fields in PHP?