title: Yii addInCondition with floats: How to ? and why addInCondition('column', array(1.1, 1.3)) don't work?
body: <p>How to addInCondition with floats?</p>
  
  <p>I tried a lot.</p>
  
  <p>This works ok:</p>
  
  <pre><code>$criteria=new CDbCriteria();
  $criteria-&gt;addInCondition('order_id',array(36907));
  $tasks=OrderTask::model()-&gt;findAll($criteria);
  </code></pre>
  
  <p>In my case it returns 4 models:</p>
  
  <p><img src="https://i.stack.imgur.com/ylF7l.jpg" alt=""></p>
  
  <p>But if I try</p>
  
  <pre><code>$criteria=new CDbCriteria();
  $criteria-&gt;addInCondition('order_id',array(36907));
  $criteria-&gt;addInCondition('step',array(3.20));
  $tasks=OrderTask::model()-&gt;findAll($criteria);
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>$criteria=new CDbCriteria();
  $criteria-&gt;addInCondition('step',array("3.20"));
  $tasks=OrderTask::model()-&gt;findAll($criteria);
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>$criteria=new CDbCriteria();
  $criteria-&gt;addInCondition('step',array('3.2'));
  $tasks=OrderTask::model()-&gt;findAll($criteria);
  </code></pre>
  
  <p>Results are empty.</p>
  
  <p>According to log, the query is:   </p>
  
  <blockquote>
    <p>system.db.CDbCommand.query(SELECT * FROM <code>orders_tasks</code> <code>t</code> WHERE step=:ycp1. Bound with :ycp1=3.2)</p>
  </blockquote>
  
  <p>This query in phpmyadmin returns 5360 rows</p>
  
  <pre><code>SELECT * FROM  `orders_tasks`  `t` WHERE step = 3.20
  </code></pre>
  
  <p>This queries in phpmyadmin returns 0 rows</p>
  
  <pre><code>SELECT * FROM  `orders_tasks`  `t` WHERE step = '3.20'
  SELECT * FROM  `orders_tasks`  `t` WHERE step = '3.2'
  SELECT * FROM  `orders_tasks`  `t` WHERE step = "3.20"
  </code></pre>
  
  <p>This try</p>
  
  <pre><code>$criteria=new CDbCriteria();
  $criteria-&gt;addInCondition('step',array("3,20"));
  $tasks=OrderTask::model()-&gt;findAll($criteria);
  </code></pre>
  
  <p>returns Models with step=3 OR 20</p>
  
  <p>This query in phpmyadmin returns rows with step=3 OR 20</p>
  
  <pre><code>SELECT * FROM  `orders_tasks`  `t` WHERE step = '3,20'
  </code></pre>
  
  <p>So, how to <code>addInCondition</code> with floats?</p>
  
  <h1>Details, for instance</h1>
  
  <p><code>step</code> field is <code>float(8,2)</code></p>
  
  <p>Sql table dump:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `orders_tasks` (
    `task_id` int(11) NOT NULL AUTO_INCREMENT,
    `order_id` int(11) NOT NULL,
    `step` float(6,2) NOT NULL,
    `done` int(1) NOT NULL DEFAULT '0',
    PRIMARY KEY (`task_id`),
    KEY `order_id` (`order_id`),
    KEY `step` (`step`),
    KEY `orderstep` (`order_id`,`step`)
  ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
  </code></pre>
  
  <p>Yii version: 1.1.10</p>