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 QuestionsI am unable to make pages for my search result.Below I am giving the code that I am using. Career Search result Yami says
How do I limit the number of rows returned?
What is the correct way to connect to a MySQL database?
How do I find the longest value in my mysql table?
Why will this statement not print a column with "lastname space firstname"? Print " .$info['businessname'] "; Print " .$info['firstname']. " " .$info['lastname'] "; I want to see 2 columns - a