php/sql question: is the following possible to query a mysql database to echo who has the max totalmark?
Jun 8th, 2010
$sqlquery2 = “SELECT fname, surname, max(exam + project + participation) AS totalmark FROM details”;
$results2 = mysql_query($sqlquery2);
I can’t store totalmark as an extra column in the database which would make it alot easier.
mark – what would i put in column name:
if ( $results2["columnname"] > $max )
{
$max = $results["columnname"];
};

Twitter
1 Comment