Minase Posted October 23, 2009 Share Posted October 23, 2009 i have a table with users and i want to select everything from certain users like select * from users where ID = 1 AND ID =2 this should return the 2 rows ... how can i achieve this? thank you Link to comment https://forums.phpfreaks.com/topic/178729-solved-multiple-select/ Share on other sites More sharing options...
cags Posted October 23, 2009 Share Posted October 23, 2009 An ID of a row can't possibly be 1 AND 2. I think you mean OR. Link to comment https://forums.phpfreaks.com/topic/178729-solved-multiple-select/#findComment-942795 Share on other sites More sharing options...
Minase Posted October 23, 2009 Author Share Posted October 23, 2009 after i posted i was thinking about it :| OR was what i needed thank you Link to comment https://forums.phpfreaks.com/topic/178729-solved-multiple-select/#findComment-942796 Share on other sites More sharing options...
kickstart Posted October 23, 2009 Share Posted October 23, 2009 Hi As above or:- select * from users where ID IN (1,2) All the best Keith Link to comment https://forums.phpfreaks.com/topic/178729-solved-multiple-select/#findComment-942798 Share on other sites More sharing options...
Minase Posted October 23, 2009 Author Share Posted October 23, 2009 thanks for quicker solution Link to comment https://forums.phpfreaks.com/topic/178729-solved-multiple-select/#findComment-942801 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.