Hi, I'm using php3-Oracle 8i on a web project,
I'm getting and error I have no idea what the cause is...this occurs where I'm inserting a new record on a table...
the most strange thing is the insert command as it appears below works fine if I use it in oracle sqlplus...
this is the php code:
$sql = "INSERT INTO SUSCRIPCION (ID_SUSCRIPCION,NOMBRES,APELLIDOS,DIRECCION,TELEFONO_OFICINA,TELEFONO_CASA,EMAIL,FECHA_NACIMIENTO,PROFESION,ESTADOCIVIL,";
$sql.= "TIPO_IDENTIFICACION,NUMERO_IDENTIFICACION,CIUDAD,TIPO_TARJETA,NUMERO_TARJETA,EXPIRACION_MES,EXPIRACION_ANO,NUMERO_CUOTAS,RENOVACION,";
$sql.= "COMENTARIOS,TIPO_SUSCRIPCION,ENVIADO,FECHA_ENVIO,PAQSUS_ID_PAQUETESUSCRIPCION) ";
$sql.= "VALUES (SEQ_SUSCRIPCION.NEXTVAL,'" .$nombres."','".$apellidos."','".$direccion."','".$telefono_oficina."','".$telefono_casa."',";
$sql.= "'".$email."','".$fecha_nacimiento."',".$profesion.",".$estadocivil.",".$tipo_identificacion.",'".$numero_identificacion."',";
$sql.=$ciudad.",".$tipo_tarjeta.",'".$numero_tarjeta."',".$mes_expiracion.",".$ano_expiracion.",".$numero_cuotas.",".$renovacion.",'";
$sql.=$comentarios."',".$tipo_suscripcion.",0,SYSDATE,".$fid_paquete.")";
$stmt = OCIParse($conn, $sql);
OCIExecute($stmt)
OCIFreeStatement($stmt);
this is the table structure:
ID_SUSCRIPCION NOT NULL NUMBER(10) NOMBRES VARCHAR2(50) APELLIDOS VARCHAR2(50) DIRECCION VARCHAR2(100) TELEFONO_OFICINA VARCHAR2(30) TELEFONO_CASA VARCHAR2(30) EMAIL VARCHAR2(50) FECHA_NACIMIENTO DATE PROFESION NUMBER(4) ESTADOCIVIL NUMBER(4) TIPO_IDENTIFICACION NUMBER(4) NUMERO_IDENTIFICACION VARCHAR2(30) CIUDAD NUMBER(4) TIPO_TARJETA NUMBER(4) NUMERO_TARJETA VARCHAR2(32) EXPIRACION_MES NUMBER(4) EXPIRACION_ANO NUMBER(4) NUMERO_CUOTAS NUMBER(4) RENOVACION NUMBER(4) COMENTARIOS LONG TIPO_SUSCRIPCION NUMBER(4) ENVIADO NUMBER(4) FECHA_ENVIO DATE PAQSUS_ID_PAQUETESUSCRIPCION NUMBER(7)
the error message :
ORA-01861 literal does not match format string
Cause: Literals in the input must be the same length as literals in the format string (with the exception of leading white space). If the "FX" modifier has been toggled on, the literal must match exactly, with no extra white space.
Action: Correct the format string to match the literal.
I appreciate any information you could give me regarding this issue,
Thanks in advance