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 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) Link to comment https://forums.phpfreaks.com/topic/81789-shortest-way/#findComment-416043 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.