neo Posted December 13, 2008 Report Share Posted December 13, 2008 (edited) MYSQL tabulas "rez" lauks: a ----------- 1 1 1 4 4 7 8 8 $query = "SELECT *, COUNT(a) FROM rez GROUP BY a "; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo "$skaits Cipars <b>".$row[a]."</b> a laukaa ir ievadiits ". $row['COUNT(a)'] ." reizes."; echo "<br />"; } Nekaadiigi nesanaak sasorteet peec reizu skaita cik dotajaa laukaa atkaartojas katrs cipars. HELP! Paldies jau iepriekš. Edited December 13, 2008 by neo Link to comment Share on other sites More sharing options...
marrtins Posted December 13, 2008 Report Share Posted December 13, 2008 SELECT *, COUNT(a) sk FROM rez GROUP BY a ORDER BY sk Link to comment Share on other sites More sharing options...
Recommended Posts