Would: SELECT id,first,last FROM names ORDER BY id LIMIT 2,1;
Work? Limits to one result, start at second offset. (I may have the 2,1 in the wrong order though) > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 13, 2003 10:20 PM > To: [EMAIL PROTECTED] > Subject: select the next name > > > To begin with I am only about 3/4 of the pay through paul d's > great book so bear with me. Say I have a table (names) with > columns (id, first, last) and I want the next name when ordered > by last, first in the table, say given a particular id. So how > would I frame the query. Something like > > select id,last, first from names where next id from index of last,first > > ??? > > Thanks > > Sam D > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php