bluetiger Posted June 13, 2007 Share Posted June 13, 2007 I want to search multiple coloums on my database, I can get it to work searching one cloum with this queary SELECT * FROM Profile WHERE Profile.Location1 = colname I tried this SELECT * FROM Profile WHERE Profile.Location1 = colname OR Profile.Location2 = colname OR Profile.Location3 = colname ANY ONE HELP!? Location1, 2,3 all have different areas in the some have three filled in some only two etc eg location1 birmingham location2 london location3 brighton If the user searchs for 'brighton' i want it to search all three coloums and if one has the correct result I want to display it Quote Link to comment https://forums.phpfreaks.com/topic/55430-search-queary/ Share on other sites More sharing options...
trq Posted June 13, 2007 Share Posted June 13, 2007 SELECT * FROM Profile WHERE Location1 = 'colname' OR Location2 = 'colname' OR Location3 = 'colname'; Quote Link to comment https://forums.phpfreaks.com/topic/55430-search-queary/#findComment-273969 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.