title: I cant insert date from codeigniter into mysql DATE column
body: <p><strong>CONTROLLER</strong></p>
  
  <pre><code>$date=date("Y-d-m");
  $succes=$this-&gt;pl-&gt;insert_ad($brandID,$model,$price,$year,$picture,$resized,$fuels,$id_usera,$date);
  </code></pre>
  
  <p><strong>Model</strong></p>
  
  <pre><code>public function insert_ad($brand,$model,$price,$year,$picture,$resized,$fuels,$date)
  {
   $sql1="INSERT INTO `ads`(`model`, `year`, `price`, `photo`, `date`, `resized_photo`, `id_fuel`, `id_brand`)
           VALUES ('".$model."','".$year."','".$price."','".$picture."','".$date."','".$resized."','".$fuels."','".$brand."')";
    $this-&gt;db-&gt;query($sql1);
    return $this-&gt;db-&gt;insert_id();
  }
  </code></pre>
  
  <p>I print it with <code>print_r($date)</code> and it displays <code>2016-03-16</code>, I really dont now why it wont insert like everything else.</p>
  
  <p>Table structure 
  <a href="https://i.stack.imgur.com/P5cVv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P5cVv.jpg" alt="enter image description here"></a></p>