Ver Mensaje Individual
  #7 (permalink)  
Antiguo 14/09/2007, 12:00
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Re: ERROR: ingreso a SQL

Te esta diciendo que tu campo no te va a llegar formateado como quieres, por eso te inserta 0000-00-00, necesitas armar el campo antes del insert y luego pasarlo al insert:
Código PHP:
$fecha $_POST['fecha1'] . "-" $_POST['fecha2'] . "-" $_POST['fecha3'];
$insertSQL sprintf("INSERT INTO registro (id, nombre, apellido, email, telefono, ciudad, fecha) VALUES (%s, %s, %s, %s, %s, %s, %s)",
                       
GetSQLValueString($_POST['id'], "int"),
                       
GetSQLValueString($_POST['nombre'], "text"),
                       
GetSQLValueString($_POST['apellido'], "text"),
                       
GetSQLValueString($_POST['email'], "text"),
                       
GetSQLValueString($_POST['telefono'], "int"),
                       
GetSQLValueString($_POST['ciudad'], "text"),
                       
$fecha); 
Saludos.