SUM DESC????
Jeg har dette stykke kode hvor total kommer ud i en pærevælling, jeg kunne godt tænke mig at total blev listet med det største tal/resultat foroven, nogen der kan hjælpe med det?__________________________________________________________
$start = mktime(0, 0, 0, $month , $dayOfMonth, $s_year);
$slut = mktime(0, 0, 0, $e_month , $e_dayOfMonth, $e_year);
$numb = $_GET["numb"];
if(isset($_GET["search"]))
{
$nysql_query = "SELECT SUM(op.products_quantity) AS total, op.products_id, p.product_certain_amount, op.products_name FROM orders_products op, orders o, products p WHERE op.products_id = p.products_id AND op.orders_id = o.orders_id AND o.todaystarted >=$start AND $slut >= o.todaystarted AND o.orders_status !=4 AND o.orders_status != 0 GROUP BY op.products_id";
echo $nysql_query . '<br>';
$nyq = mysql_query($nysql_query) or die(mysql_error());
echo '<table border="1"><tr><th width="20%">Lokation</th><th width="20%">Varenummer</th><th width="30%">Produkt</th><th width="20%">Antal solgte</th><th width="20%">Alt. lokali.</th></tr>';
$x = 0;
while($ny_row = mysql_fetch_assoc($nyq))
{
$x++;
$bgcolor = $x % 2 == 0 ? 'ffffff' : 'eeeeee';
echo '<tr style="background-color:#' . $bgcolor . ';"><td>' . $ny_row["product_certain_amount"] . ' </td><td>' . $ny_row["products_id"] . '</td><td>' . $ny_row["products_name"] . '</td><td>' . $ny_row["total"] . '</td><td> </td></tr>';
}
echo '</table>';