Answer the question
In order to leave comments, you need to log in
How to do a field search if the field value is a range?
Hello.
The database has a price column - a varchar type field, where approximately the following values are stored
: 1. NULL
2. 100
3. 5000
4. 100-250 - range (there are problems with it)
I need to do a search, find all records where the price is higher 50 (should show 2-4)
or find everything where the price is between 100 and 500 (should show 2, 4)
How do I search in a range? Is it possible to split a value by "-" character in MySQL ?
Answer the question
In order to leave comments, you need to log in
1. kill your DBA
2. redo the table - enter price_min and price_max.
The first item is required, the second is optional.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question