flemingmike Posted September 24, 2010 Share Posted September 24, 2010 hello, how would i word select * from jobs where id equals 1, 2 or 3? Quote Link to comment https://forums.phpfreaks.com/topic/214318-select-where-id-equals/ Share on other sites More sharing options...
PFMaBiSmAd Posted September 24, 2010 Share Posted September 24, 2010 http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_in Quote Link to comment https://forums.phpfreaks.com/topic/214318-select-where-id-equals/#findComment-1115277 Share on other sites More sharing options...
George Botley Posted September 24, 2010 Share Posted September 24, 2010 $query = "SELECT * FROM database WHERE id='1' OR id='2' OR id='3'"; $query = mysql_query($query); Then do what you want with that, such as get data etc. Quote Link to comment https://forums.phpfreaks.com/topic/214318-select-where-id-equals/#findComment-1115280 Share on other sites More sharing options...
Maq Posted September 24, 2010 Share Posted September 24, 2010 #1 - This belongs in the MySQL section. #2 - Please don't be lazy and do a bit of research. Quote Link to comment https://forums.phpfreaks.com/topic/214318-select-where-id-equals/#findComment-1115283 Share on other sites More sharing options...
flemingmike Posted September 24, 2010 Author Share Posted September 24, 2010 thanks! Quote Link to comment https://forums.phpfreaks.com/topic/214318-select-where-id-equals/#findComment-1115284 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.