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 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' Link to comment https://forums.phpfreaks.com/topic/208025-mysql-or/#findComment-1087427 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.