I’ve trying to write a search for a mysql table, but struggling if it’s possible.
I have a table that may have multiple numbers, i.e. an object may be available in sizes [3, 6, 13, 26] Initially separating them in to different rows allowed a search, but the same event would appear for everything within the Greater/Less Than or Between search range via: -
SELECT * FROM mytable WHERE SeqNumber >=$POSTmin AND SeqNumber<=$POSTmax;
SELECT * FROM mytable WHERE SeqNumber BETWEEN $POSTmin AND $POSTmax;
Unfortunately combining them in to 1 row, but with multiple sizes [3, 6, 13, 26] would only work on the first value within the range. Searching on a single number does work with a LIKE: -
SELECT * FROM mytable WHERE SeqNumber LIKE '%$POSTvarible%';
But I would like to know if it’s possible, if so how, I can search Max & Min if that number appears at random positions in a cell?