in reply to Re: Can this be done entirely in MySQL?
in thread Can this be done entirely in MySQL?
You can use ignore index if you want the natural order, but the you can't currently create a descending index.
create index registrants_lname_asc on registrants (lname ASC); SET @rownum := 0 SELECT CONCAT(min(@rownum := @rownum + 1), '-', max(@rownum), ' (', min(lname), '-', max(lname), ')') from registrants use index (registrants_lname_asc) group by floor(@rownum/100)
|
|---|