I have MySQL column Sizes
which contains on every row data looking like this:
6 (39), 7 (40.5), 10 (44), 11 (45), 11½ (45.5), 12 (46)
6 (39), 7, 7 (40.5), 8 (42), 8½ (42.5), 9 (43), 10 (44.5), 11 (46)
6 (39), 7, 7 (40.5), 8 (42), 8½ (42.5), 9 (43), 11 (46)
I want to select from MySQL only the rows which contains specificly this 7,
.
So if i have only three rows with data with the MySQL selection i have to get only the last two rows because they have 7,
which is different from 7 (45),
Here is what i tried so far but somehow it is not working:
$Size = "7";
$Sizes = "$Size,";
$CategoryFilter = $_POST['CategoryFilter'];
$r = mysql_query("SELECT * FROM `products` WHERE `Category`='$CategoryFilter' AND `Sizes` LIKE '%$Sizes%'");
$SDProductCode = array();
$Number = 0;
while($rowi = mysql_fetch_array($r))
{
$SDProductCode[] = $rowi['ProductCode'];
$result['productcode'][] = $rowi['ProductCode'];
$Number++;
}
Why my selection is not working, can you help me out ?
Thanks in advance!