Hokus Posted November 16, 2003 Share Posted November 16, 2003 How can i sellect one value from multible cols ? "SELECT * FROM recipes WHERE category1 OR category2 OR category3 = \'Appetizers\' "; what query would i use ? Thanks. Link to comment https://forums.phpfreaks.com/topic/1376-query/ Share on other sites More sharing options...
Barand Posted November 16, 2003 Share Posted November 16, 2003 You can either set up a fulltext index on the 3 columns or \"SELECT * FROM recipes WHERE (category1 = \'Appetizers\' ) OR (category2 = \'Appetizers\' ) OR (category3 = \'Appetizers\' )\"; Link to comment https://forums.phpfreaks.com/topic/1376-query/#findComment-4544 Share on other sites More sharing options...
Hokus Posted November 16, 2003 Author Share Posted November 16, 2003 Thanks, works like a charm. Link to comment https://forums.phpfreaks.com/topic/1376-query/#findComment-4549 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.