si eso quiero, pero mira de donde lo tomo de este codigo?
no logro identificar de donde tomar el $row['Id'] de esto....
Código PHP:
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $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;
}
if ((isset($HTTP_GET_VARS['Id'])) && ($HTTP_GET_VARS['Id'] != "")) {
$deleteSQL = sprintf("DELETE FROM products WHERE Id=%s",
GetSQLValueString($HTTP_GET_VARS['Id'], "int"));
mysql_select_db($database_oConnPep, $oConnPep);
$Result1 = mysql_query($deleteSQL, $oConnPep) or die(mysql_error());
}