Ver Mensaje Individual
  #5 (permalink)  
Antiguo 06/08/2010, 11:28
Avatar de elchicho118
elchicho118
 
Fecha de Ingreso: mayo-2010
Mensajes: 74
Antigüedad: 14 años
Puntos: 1
Respuesta: error en insert into

Cita:
Iniciado por danielalejandro Ver Mensaje
demonios creo que soy muy malo miren ahora me tira este error

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 '' at line 1

y mi codigo lo corregi como me han dicho y mejor lo deje asi pero sigue igual por que sera no tengo idea no seran por las comillas que le paso por la variable de $imagen (img src="imagen.jpg"...>)

$conecta = mysql_query("INSERT INTO noticias(por, titulo, imagen, texto, visto, fecha, url, pretexto) values('$por','$titulo','$imagen','$comentario','$ fuente','$fecha','$url','$pretexto' ") or die(mysql_error());
ahora el parentesis

ponlo asi

Código PHP:
Ver original
  1. $conecta = mysql_query("INSERT INTO noticias(por, titulo, imagen, texto, visto, fecha, url, pretexto) values('$por','$titulo','$imagen','$comentario','$fuente','$fecha','$url','$pretexto' )") or die(mysql_error());
__________________
QUISIERA HACER LO QUE NADIE HA HECHO EN LA MITAD DE TIEMPO