Código PHP:
Ver original
function Save2_Article() { $titulo = $_POST['Titulo']; $seccion = $_POST['seccion']; $estado = $_POST['estado']; $autor = $_POST['Autor']; $cuerpo = $_POST['elm1']; $query = "UPDATE articulos SET title = '$titulo', cat_id = '$seccion', st_id = '$estado', autor = '$autor', body = '$cuerpo', editado = '$fecha' WHERE id = ".$_REQUEST['id']; { Print "EL artículo se actuazó correctamente!"; } else { } }
Y este el error que obtengo:
Cita:
ahora, si la consulta la pongo así: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
Código PHP:
Ver original
$query = "UPDATE articulos SET title = $titulo, cat_id = $seccion, st_id = $estado, autor = $autor, body = $cuerpo, editado = $fecha WHERE id = ".$_REQUEST['id'];
este es el error que obtengo:
Cita:
¿Cual es el problema? 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 'Valle del Bravo, cat_id = 2, st_id = 2, autor = Fernando Leonor, body =
Bienv' at line 1
Bienv' at line 1
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
Cabe aclarar que los campos body (contiene html) y editado son del tipo TEXT y DATETIME respectivamente.
Saludos.