Código PHP:
$updateSQL = sprintf("UPDATE Usuarios SET Nombre=%s, NIP=%s, E_mail=%s, Extension=%s WHERE Ficha= %s",
GetSQLValueString($_POST['Nombre'], "undefined"),
GetSQLValueString($_POST['NIP'], "text"),
GetSQLValueString($_POST['E_mail'], "text"),
GetSQLValueString($_POST['Extension'], "text"),
GetSQLValueString(trim($_POST['Ficha']),"int"));
mysql_select_db($database_Pases2, $Pases2);
$Result1 = mysql_query($updateSQL, $Pases2) or die(mysql_error());
Ese ' APOSTROFE que esta en rojo despues de Ficha = 1234 es el error pero no se en qeu momento lo pone. alguien que me pueda ayudar y de antemano gracias.
Los valores estan bien definidos pero adjunto el codigo para mayor referencia:
Código PHP:
mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
