problema insert myql
Publicado por leandro (9 intervenciones) el 15/09/2012 19:05:02
buenas tardes gente, tengo el siguiente problema me muestra este cartel:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' Sábado 15 de Septiembre del 2012 01:55:31 PM, Titulo, Contenido de l)' at line 1
cuando intento insertar en mysql esta consulta y no puedo insertarla:
$query = mysql_query("INSERT INTO noticias (idnoticias, fecha, titulo, contenido) VALUES (, $fecha, $_POST[titulo], $_POST[contenido])") or die(mysql_error());
les paso la estructura de la tabla mysql para que vean:
Campo Tipo Cotejamiento Nulo Extra
idnoticias int(6) No auto_increment
fecha text utf8_general_ci No
titulo text utf8_general_ci No
contenido text utf8_general_ci No
espero puedan ayudarme. Muchas Gracias. Leandro
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' Sábado 15 de Septiembre del 2012 01:55:31 PM, Titulo, Contenido de l)' at line 1
cuando intento insertar en mysql esta consulta y no puedo insertarla:
$query = mysql_query("INSERT INTO noticias (idnoticias, fecha, titulo, contenido) VALUES (, $fecha, $_POST[titulo], $_POST[contenido])") or die(mysql_error());
les paso la estructura de la tabla mysql para que vean:
Campo Tipo Cotejamiento Nulo Extra
idnoticias int(6) No auto_increment
fecha text utf8_general_ci No
titulo text utf8_general_ci No
contenido text utf8_general_ci No
espero puedan ayudarme. Muchas Gracias. Leandro
Valora esta pregunta
0