I'll give an example to clarify - excuse the poor coding conventions where I omit error reporting:
// Find total amount of donations
$sql = mysql_query("SELECT donation FROM donors");
while ($myarray = mysql_fetch_array($sql)) {
$totaldonation .= $myarray['donation'];
}
$query = "SELECT email, name, donation FROM donors ORDER BY <<percent donated. in other words, donation/$totaldonation>>";
mysql_query($query).......etc.
So, basically, how can I format the ORDER BY so that it sorts based on that calculation, even though the donation for this individual hasn't been calculated yet?
I appreciate the help