Braiens Posted September 5, 2007 Report Share Posted September 5, 2007 ta ir kods: <?php $mysqli = mysql_connect("localhost", "****", "****"); mysql_select_db("****"); $c = "0"; if (mysql_error()) { printf("Savienojumā kļūda: %s\n", mysql_error()); exit(); } /* Ja velies lai no lielaka uz mazako lieto shito rindinju :) $result = mysql_query("SELECT * FROM `rekordi` GROUP BY punkti DESC Limit 100"); */ $result = mysql_query("SELECT * FROM `rekordi` GROUP BY punkti ASC Limit 100"); while ($myrow = mysql_fetch_array($result)) { $vards = $myrow['vards']; $punkti = $myrow['punkti']; $c++; echo " <tr> <td>".$c."</td> <td>".$vards."</td> <td>".$punkti."</td> </tr> \n\r"; } mysql_close(); ?> Lieta tada ka ir paris vienadi ieraksti, bet vinsh nezkapec izdod tikkai 1, bet vajag lai izdod visus ierakstus ati sakita vienados... Link to comment Share on other sites More sharing options...
Roze Posted September 5, 2007 Report Share Posted September 5, 2007 GROUP BY vietā lieto ORDER BY eg .. SELECT * FROM `rekordi` ORDER BY punkti ASC Limit 100 Link to comment Share on other sites More sharing options...
Recommended Posts