in reply to fetching data from MySQL
b)SELECT word FROM tablename ORDER BY id ASC
version b) looks more complicated, but it makes you independent from the identifiers.ALTER TABLE tablename ADD INDEX(line_n); ALTER TABLE tablename ADD INDEX(word_position); ALTER TABLE tablename ADD INDEX(line_n,word_position); SELECT word FROM tablename USE INDEX(line_n,word_position) ORDER BY (l +ine_n*100+word_position) ASC;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: fetching data from MySQL
by samtregar (Abbot) on Apr 27, 2008 at 16:11 UTC |