$result = mysql_query(\"SELECT row,count(row) as antal from tabel group by ip order by antal desc\"); $row = mysql_fetch_array($result); echo \"Denne værdi forekommer flest gange $row[row] nemlig $row[antal] gange\";
Hvorfor virker denne ikke: SELECT fel_id, fel_col_id, fel_firstn, fel_lastn, fel_img_id, col_hexcode, col_name, cri_fel_id, count(cri_fel_id) as antal from FROM colors, fellon, crimes group by cri_fel_id WHERE fel_col_id = col_id AND fel_id = cri_fel_id ORDER BY antal DESC LIMIT 1
nu kender jeg jo ikke dine tabeller men mon ikke noget i denne retning skulle bruges:
SELECT fellon.fel_id, fellon.fel_col_id, fellon.fel_firstn, fellon.fel_lastn, fellon.fel_img_id, colors.col_hexcode, colors.col_name, crimes.cri_fel_id, count(crimes.cri_fel_id) as antal FROM colors, fellon, crimes group by crimes.cri_fel_id WHERE fellon.fel_col_id = colors.col_id AND fellon.fel_id = crimes.cri_fel_id ORDER BY antal DESC LIMIT 1
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.