ins-coder Posted June 2, 2012 Share Posted June 2, 2012 [b]MySQL[/b] +----+ | id | +----+ | 1 | +----+ | 2 | +----+ | 3 | +----+ | 4 | +----+ +----+ | 5 | +----+ How do I show records from a specific ID so the list would show 2,3,4,5 or 3,4,5? I figured to do with two queries in UNION but end up showing 2,1,3,4,5 or 2,5,4,3,1. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted June 2, 2012 Share Posted June 2, 2012 You haven't provided enough information for anyone to figure out what it is you're really after. Quote Link to comment Share on other sites More sharing options...
smoseley Posted June 2, 2012 Share Posted June 2, 2012 SELECT * FROM table_name WHERE id IN (2,3,4,5) ORDER BY id ASC; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.