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. Link to comment https://forums.phpfreaks.com/topic/263518-how-to-show-records-from-a-specific-id/ 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. Link to comment https://forums.phpfreaks.com/topic/263518-how-to-show-records-from-a-specific-id/#findComment-1350480 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; Link to comment https://forums.phpfreaks.com/topic/263518-how-to-show-records-from-a-specific-id/#findComment-1350492 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.