title: MySQL default values not working as expected
body: <p><strong>Hi friends from SO!</strong></p>
  
  <p>This code used to be working, but it seems like it stop working when I cloned the database. There's a table called maps, which has some default values, like maximum. As far as I understand, if my INSERT code has no value, then, the dafault value will be used.</p>
  
  <p>This is what I'm doing:</p>
  
  <p><strong>These values might be there, as they might not be there.</strong></p>
  
  <pre><code>$scan-&gt;maximo_exploracion   = addslashes($_GET['scan_maximo_exploracion']);
  $scan-&gt;proceso_analisis = addslashes($_GET['scan_proceso_analisis']);
  $scan-&gt;email_user           = addslashes($_GET['scan_email_user']);
  $scan-&gt;email_owner          = addslashes($_GET['scan_email_owner']);
  </code></pre>
  
  <p><strong>Then:</strong></p>
  
  <pre><code>db_ask($db_resonance_slave, "
  INSERT INTO mapas
  SET
  usuario_id              = '$user-&gt;id',
  maximo_exploracion      = '$scan-&gt;maximo_exploracion',
  proceso_analisis        = '$scan-&gt;proceso_analisis',
  email_user              = '$scan-&gt;email_user',
  email_owner             = '$scan-&gt;email_owner',
  max_proc                = '5',
  proceso_exploracion     = 'esperando',
  direccion               = '$scan-&gt;address',
  dominio                 = '$scan-&gt;dominio',
  dominio_id              = '$dominio-&gt;id',
  server_address          = '$scan-&gt;server_address',
  server_zone             = '$scan-&gt;zone_name',
  server_zone_code        = '$scan-&gt;zone_code',
  server_response_speed   = '$scan-&gt;server_response_speed'
  ");
  </code></pre>
  
  <p>Now, a few days ago, with the same code, if <strong>$scan->maximo_exploracion</strong>  didn't have any information, the record would be inserted with the default value which is 100.</p>
  
  <p>At this moment, it's appearing blank. Which, of course, is causing problems.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks!
  Chris;</p>
  
  <hr>
  
  <p><strong>The Table:</strong></p>
  
  <pre><code>CREATE TABLE `mapas` (
  `id` INT(12) NOT NULL AUTO_INCREMENT,
  `usuario_id` VARCHAR(256) NOT NULL,
  `maximo_exploracion` VARCHAR(256) NOT NULL DEFAULT '100',
  `max_proc` VARCHAR(256) NOT NULL,
  `open_proc` VARCHAR(256) NOT NULL,
  `hora_lanzado` VARCHAR(256) NOT NULL,
  `direccion` VARCHAR(256) NOT NULL,
  `dominio` VARCHAR(256) NOT NULL,
  `dominio_id` VARCHAR(256) NOT NULL,
  `idioma` VARCHAR(256) NOT NULL,
  `server_address` VARCHAR(256) NOT NULL,
  `server_zone` VARCHAR(256) NOT NULL,
  `server_zone_code` VARCHAR(256) NOT NULL,
  `server_response_speed` VARCHAR(256) NOT NULL,
  `proceso_exploracion` VARCHAR(256) NOT NULL DEFAULT 'esperando',
  `proceso_analisis` VARCHAR(256) NOT NULL DEFAULT 'esperando',
  `email_owner` VARCHAR(256) NOT NULL DEFAULT 'False',
  `email_user` VARCHAR(256) NOT NULL DEFAULT 'True',
  `eliminado` INT(12) NOT NULL DEFAULT '0',
  `creacion` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
  )
  </code></pre>
  
  <p>COMMENT='Almacena mapas, los mapas son ordenes de exploración y análisis para un dominio específico.'
  COLLATE='latin1_swedish_ci'
  ENGINE=InnoDB;</p>