asmith Posted December 15, 2007 Share Posted December 15, 2007 if want to search a table like : select * from table where (aa1 = "john" and aa2="smith") or (aa1="smith" and aa2="john") or (aa3 .... can i type it in a shorter way ? i want to search if 2 values are in a row or not , no matter under which column , but in the same row . thanks Quote Link to comment https://forums.phpfreaks.com/topic/81789-shortest-way/ Share on other sites More sharing options...
beebum Posted December 16, 2007 Share Posted December 16, 2007 Have a look at fulltext index. If you index the columns, you can then do something like match (indexed_columns) against (+john +smith) Quote Link to comment https://forums.phpfreaks.com/topic/81789-shortest-way/#findComment-416043 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.