title: PDO FetchAll returns an empty array but there is value in db
body: <p>I have a drop down box with multiple select . The dropdown looks like this:</p>
  
  <pre><code> &lt;select multiple class="form-control" name="batch_no[]"  id="batch_no" required onchange="getBatchCourseDetail();"&gt;
  &lt;option value=""&gt;-----------Select Your Batch----------&lt;/option&gt;
  &lt;?php
  foreach ($result as $res) 
  {
    ?&gt;
      &lt;option value="&lt;?php echo $res['batch_code']; ?&gt;"&gt;&lt;?php echo $res['batch_code']; ?&gt;&lt;/option&gt;
  &lt;?php
   } ?&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>In onchange function call i have the script like this:</p>
  
  <pre><code>function getBatchCourseDetail()
  {
      var other = String($('#batch_no').val());
      var opts = [],
      opt;
      var split1 = other.split(',');
      for (var i = 0; i &lt; split1.length; i++) 
      {
         opt = split1[i];
         opts.push(opt);
      }
      $.ajax({
        url: 'course_apply_batch_course_detail_ajax.php',
        type: 'POST',
        data: 
        {
          batch_code: opts
        },
        success: function (data) 
        {
          //console.log(data);
          $('#batch_information_autofill').html(data);
        }
     });
  }
  </code></pre>
  
  <p>In the ajax file that is in course_apply_course_detail_ajax.php page I retrieve all the values of the drop down .</p>
  
  <p>course_apply_course_detail_ajax.php :</p>
  
  <pre><code>&lt;?php
   require('classes/autoloader.php');
   $course_apply = new \Model\CourseApplyModel();
   $batch_code111=array();
   $batch_code111 = $_POST['batch_code'];
   $batch_code1 ="'" .implode("','",$batch_code111) ."'";
  
   $parameter = array(
      "batchcode" =&gt; $batch_code1,
      "status" =&gt; 0);
  
   $result11 =$course_apply-&gt;getBatchCourseDetail11($parameter);
  
   echo"&lt;pre&gt;";
   print_r($result11);
   echo"&lt;/pre&gt;";
   exit;
   ?&gt;
  </code></pre>
  
  <p>I will be getting the $batch_code1 values as : 'LATS-CHMB-1000','LATS-SA-1000','LATS-ABSE-1003' which is stored in the array variable 'batchcode'.</p>
  
  <p>In Model My query looks like this:</p>
  
  <pre><code> public function getBatchCourseDetail11($parameter)
  {
   /* $QUERY1="SELECT start_date,end_date,course_code FROM batch WHERE
       batch_code IN('LATS-CHMB-1000','LATS-SA-1000','LATS-ABSE-1003') AND status =0"; */
  
    $query1="SELECT start_date,end_date,course_code FROM batch WHERE status =:status AND batch_code IN(:batchcode)";
    try{
          $result1=$this-&gt;dbh-&gt;prepare($query1);
          $result1-&gt;execute($parameter);
          $data11=$result1-&gt;fetchAll(\PDO::FETCH_ASSOC);
          return $data11;
      }
      catch(\PDOException $e)
      {
          print_r($e);
          return false;
      }
  
  }
  </code></pre>
  
  <p>When i try to print the return data i'm getting array() but the query is executing correctly in the phpmyadmin. </p>
  
  <p>Thanks in advance please help me to get solved from this issue.</p>