I have strange problem. Im using Yii2 (latest stable). I have table with some filters for diamond base. One of filters r float (Weight).
When i trying to filter from 1.1 to 1.2 - i see results in array from active record. When im trying to request 1.1 to 1.1 (exact weight) yii returns empty array.
I try to copy request from debug toolbar end execute it in mysql console and mysql returns all results correctly.
Request:
SELECT `Diamonds`.* FROM `Diamonds`
LEFT JOIN `DiamondsSpecialGroups`
ON `Diamonds`.`specialGroup` = `DiamondsSpecialGroups`.`id`
WHERE (((((`endPrice` >= 500)
AND (`type` IN (0, 1, 2, 3))) AND ((`active`=1)
AND (`internalBlock`=0)
AND (`frontendHide`=0)))
AND (`Weight`=0.39))
AND (`endPrice` >= '500'))
AND (`endPrice` <= '1323231')
ORDER BY `endPrice`
LIMIT 50
If i remove
(`Weight`=0.39)
All results sowing both in mysql and yii.
Finally question - why?