Hi, Merlin,
On Tue, 27 Jul 2004 16:13:25 +0200, I myself wrote:
> You mut not
Should be "must", not "mut" :-)
> > My problem is deceptively simple: how you read the next record from
> > a table based on a given set of values? In practice, this is
> > difficult to implement. If anybody can suggest a alternative/better
> > way to this, I'm all ears.
>
> So you really want something like
>
> 'SELECT * FROM t WHERE a>=a1 AND b>=b1 AND c>=c1 ORDER BY a,b,c ASC
> LIMIT 1'
Sorry, as you want the _next_, and I assume that a1, b1 and c1 are the
current row's values, you should rather use something like:
'SELECT * FROM t WHERE a>=a1 AND b>=b1 AND c>=c1 ORDER BY a,b,c ASC
LIMIT 1 OFFSET 1'
HTH,
Markus
--
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios@logi-track.com | www.logi-track.com