[EMAIL PROTECTED] wrote:
That can't work as my initial query, because I don't know the location of iTempID: 4 in the query resulthi, your need is: select * from temp LIMIT 3,4; -- 3 because you have to take the fourth and 4 because dist=3+1
I can see how that gets me the position of my row, but I also need rows adjacent to it.to find the position 4, the query is : mysql> select rk from(SELECT @row:[EMAIL PROTECTED] as rk,iTempID, sTemp -> FROM dist) as A -> WHERE iTempID=4; +------+ | rk | +------+ | 4 | +------+ 1 row in set (0.00 sec)
I think I'll probably end up putting the results of my query into a temp table, complete with row numbers, then run my query for that. Or maybe a derived table.
Mathias
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]