I have a field in my database called categories which holds the categories of a clothing store topics (New Arrival, Top Sellers, Men, Women, Kids etc)
I have one record that has: New Arrival, Men
I have a second record that has: New Arrival, Women
How could I query the database to select just women or just men?
I’ve tired this: SELECT * FROM products WHERE categories RLIKE [[:<:]]Men[[:>:]]'
This does work for men but it doesn’t work for women.
Well if you are actually storing the words “Men” or “Women”, your database is set up incorrectly
You should be using a linked table let us say
categoriesto link products to categories.Then you can do something like: