löste det såhär..
MySQL = "Select location, count(location) as amount from picture_views where location LIKE '%apa%' group by location order by amount limit 5"
1 svar · 149 visningar · startad av ConnyFox
har följande kod
MySQL = "Select location from picture_views where location LIKE '%apa%' group by location Limit 5"
hur gör jag för att göra så att dom 5 som hämtas är dom det finns flest av?
använder ju group by location för att bunta ihop dom men hur vet jag vilka det fanns flest utav?
löste det såhär..
MySQL = "Select location, count(location) as amount from picture_views where location LIKE '%apa%' group by location order by amount limit 5"