Page 1 of 1

how to get max 10 records from table

Posted: Fri Sep 03, 2010 9:57 am
by mianmajidali
hi to all,
i m making a raking star module, there was a field total_vote that increases when ever anyone make ranking,,, i want to get 10..or 20 whatever strength....that will have maximum values...please tell me the SELECT query to select that field's top 20 records...

thanks in advance

Re: how to get max 10 records from table

Posted: Fri Sep 03, 2010 10:10 am
by mikosiko
you can use the ORDER and LIMIT clauses to do that