How come in my code when i use @"select Score from tblMed order by Score desc limit 10" everything works fine, but when I change "desc" to "asc" the scores don't show up???
A:
Do you have NULL
scores in your records?
If you change the ordering to asc, then it would start with NULLs before selecting records with an actual value.
Brandon
2010-02-10 18:36:06
Right now the whole table is filled with zeros because i haven't play the game yet. How do i Make it so they aren't null?
Steve
2010-02-10 18:55:48
+1
A:
Because:
ORDER BY score ASC
...means that the lowest values will be at the top of the list - adding LIMIT 10
to the query will return the first 10 records with the lowest scores, so I imagine you have entries with score values of zero and/or null.
OMG Ponies
2010-02-10 18:37:08