neo Posted December 13, 2008 Report 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
marrtins Posted December 13, 2008 Report Posted December 13, 2008 SELECT *, COUNT(a) sk FROM rez GROUP BY a ORDER BY sk
Recommended Posts