in reply to Re: fetching data from MySQL
in thread fetching data from MySQL

There's no need to do multiplication tricks in the ORDER BY - MySQL supports ordering by multiple columns. Also, due to the way MySQL uses indexes you don't need separate (line_n) and (line_n,word_position) indexes. A query that could use the first index will be able to use the second one just as well.

-sam