December 22nd, 2003, 05:41 AM
Any idea how to do these kind of queries? Possible?
row -- value
5 -- 3445
8 -- 6557
98 -- 8533
32 -- 6594
675 -- 98k
Hi. Is it possible to do the following:
If i were to select row 8, i would also like ,row 5 and row 98 to be selected?
if i were to select row 98, row 8 and row 32 will be selected?
Pls advise. Thanks.
December 22nd, 2003, 06:06 AM
I don't know of a way of doing that actually. I don't think you can refer specifically to the position of a record, unless you have a totally reliable sequence, wich you could combine with a LIMIT statement.
So quick answer - select them all and do the manipulation in whatever your application language is.. php perl etc.
This is me: http://chris.uk.com
December 22nd, 2003, 08:06 AM
fused, you can do it, however you have to have some way of sequencing the rows into exactly that order
obviously, they are not in "row" sequence, and they are also not in "value" sequence, so you would have to declare another column to sequence them by, and then you could use that column to retrieve the "prev/next" rows
see Move Backward through a Table