Ver Mensaje Individual
  #19 (permalink)  
Antiguo 05/12/2009, 17:34
ib3xn0
 
Fecha de Ingreso: febrero-2008
Mensajes: 178
Antigüedad: 16 años, 2 meses
Puntos: 1
Respuesta: UPDATE en PHP

después de quedar así:

<html>
<head></head>
<body>
<?php
$result_get2=$_POST['pasa_dato2'];
include ("conexion_bd.php");
$result = mysql_query("SELECT * FROM datos_relevo WHERE num = '$result_get2'", $conexion)
or
die("Problemas en el select:".mysql_error());
while ($row = mysql_fetch_array($result)){

mysql_close($conexion);
//
if(isset($_REQUEST['modificar'])) {
include ("conexion_bd.php");
$result2=mysql_query("UPDATE datos_relevo SET '".$row['num']."', titulo='".$row['titulo']."', area='".$row['area']."', criticidad='".$row['criticidad']."', texto='".$row['texto']."' WHERE num = '$result_get2'", $conexion)or
die("Problemas SQL:".mysql_error());
echo "REALIZADO";}
else {
echo "ERROR"; }
}
mysql_close($conexion);
?>
</body></html>

Este el error:
Problemas SQL: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 ''1', titulo='Esto es otra prueba de insert y update, ya son muchas pruebas pero ' at line 1