How do I find second highest value from a table?
$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 QuestionsHow do I return a random row from the database?
How do I group the results of a mysql query?
What is difference between mysql_fetch_array and mysql_fetch_object?
I'm creating a table to store clients' info via PHP; can I make an inquiry field where the client can enter comments about their inquiry?
how will use a mysql_query to get a single4 person list? With example.