cs.punk Posted December 28, 2012 Share Posted December 28, 2012 SELECT * FROM items WHERE id = 1 OR id = 1 OR id = 1 How can I have this return 3 (the number of OR clauses) records regardless if there are duplicates? Link to comment https://forums.phpfreaks.com/topic/272444-select-records-even-if-duplicates-using-where-clause/ Share on other sites More sharing options...
Barand Posted December 28, 2012 Share Posted December 28, 2012 I think you will have to use a UNION SELECT * FROM items WHERE id = 1 UNION ALL SELECT * FROM items WHERE id = 1 UNION ALL SELECT * FROM items WHERE id = 1 Link to comment https://forums.phpfreaks.com/topic/272444-select-records-even-if-duplicates-using-where-clause/#findComment-1401775 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.