Re: Select 2 records before/after (sort by alfa first)

Message-ID: <gki7p5$shp$1@xxxxxxxxxxxxxxxxxxx> from Jerry Stuckle
contained the following:

The reason I suggested going to comp.database.mysql is there is a basic
fallacy in his logic, which people will tell him about there.

I'm guessing you mean that records have no intrinsic order. Had you
noticed the subject line? Sort by alfa (sic) first. I take it he means
that, in an alphabetically sorted list he wants the record plus two
either side.

I thought you could just do this with a query that pooled the results of
two subqueries but MySql tells me one cannot use LIMIT in subqueries.
Hence I would use PHP to achieve this and the question (sort of) remains
on topic.
Geoff Berrow 0110001001101100010000000110
100110001101101111001011100111010101101011 -

Relevant Pages