c_pattle Posted July 17, 2010 Share Posted July 17, 2010 Simple question. I was just wondering if you can have a mysql select statement which uses "or". For example I have 3 columns and I want to display a row if the value "1" is in either of those columns. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/208025-mysql-or/ Share on other sites More sharing options...
PravinS Posted July 17, 2010 Share Posted July 17, 2010 Ex. SELECT * FROM test_table WHERE field1_index = '1' OR field2_index = '1' OR field3_index = '1' Quote Link to comment https://forums.phpfreaks.com/topic/208025-mysql-or/#findComment-1087427 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.