Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/05/2006, 11:10
Pinyo22
 
Fecha de Ingreso: mayo-2006
Mensajes: 59
Antigüedad: 17 años, 11 meses
Puntos: 0
Porque falla un UPDATE ?????

Me falla el Update y no se porque....
el codigo fuente es:
if (array_key_exists('_Form_Guardar', $_POST)) {
$busq = array("'",'"');
$reemp = array("/'",'/"');
$cDescrp = str_replace ($busq,$reemp,$_POST['cDescripcio']);
$cTextoA = str_replace ($busq,$reemp,$_POST['cTexto1']);
$cTextoB = str_replace ($busq,$reemp,$_POST['cTexto2']);
$strSQL = "UPDATE SORTIDES SET SRDESCRIPCIO='$cDescrp',SRALTACUM='".$_POST['nAltura']."'";
$strSQL = $strSQL . ",SRDISTANCIA='".$_POST['nDistancia']."',SRALTMAX='".$_POST['nAltMax']."'";
$strSQL = $strSQL . ",SRALTMIN='".$_POST['nAltMin']."',SRPENDMAX='".$_POST['nPendiente']."'";
$strSQL = $strSQL . ",SRTEMPS='".$_POST['cTemps']."',SREXPLC='$cTextoA',SREXPLC2='$cTextoB' ";
$strSQL = $strSQL . " WHERE SRSORTIDA = '" . $_POST[cIdSortida] . "'";
mysql_query($strSQL, $mysql_link);
echo "<p>".$strSQL."</p>";



Y un ejemplo del resultado en texto:
UPDATE SORTIDES SET SRDESCRIPCIO='Titulo',SRALTACUM='772',SRDISTANCIA= '41',SRALTMAX='',SRALTMIN='267',SRPENDMAX='17',SRT EMPS='2.24',SREXPLC='Expicacion larga',SREXPLC2='' WHERE SRSORTIDA = '060225AA'