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!
Comment on this Question and Answer >>>
ASK A QUESTION
More mysql PHP Questions
I am unable to make pages for my search result.Below I am giving the code that I am using. Career Search result Yami saysHow do I insert the date into my table?
How do I update the contents of a table row?
My website www.quicheandpie.com has navigation buttons which were added by going to admin/categorylist and adding a category. I can add category = navigation buttons and update them, but I can not delete them. Any ideas how I can find where the info
I am extracting data from a MySQL Database of which one of the data stored is seperated by a comma. For example, step1,go here,step 2,go there,step 3,go back etc etc. I want to know how to split the data at the comma and format it in html. Using the split
