时间:2021-07-01 10:21:17 帮助过:20人阅读
删除的查询语句是怎样的
if ((isset($_GET['id'])) && ($_GET['id'] != "")) {
$deleteSQL = sprintf("DELETE FROM price WHERE id=%s",
GetSQLValueString($_GET['id'], "text"));
mysql_select_db($database_myconn, $myconn);
$Result1 = mysql_query($deleteSQL, $myconn) or die(mysql_error());
}
$colname_Recordset1 = "1";
if (isset($_GET['id'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['id'] : addslashes($_GET['id']);
}
mysql_select_db($database_myconn, $myconn);
$query_Recordset1 = sprintf("SELECT * FROM price WHERE id = %s", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $myconn) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
if (isset($_GTE['id'])){
$query_Recordset1 = sprintf("SELECT * FROM price WHERE id = %s", $colname_Recordset1);
}else{
$query_Recordset1 = "SELECT * FROM price WHERE 1=1";
}
if (isset($_GTE['id'])){
$query_Recordset1 = sprintf("SELECT * FROM price WHERE id = %s", $colname_Recordset1);
}else{
$query_Recordset1 = "SELECT * FROM price WHERE 1=1";
}
估计你是直接执行了删除代码了
估计你是直接执行了删除代码了
qq吧 编辑页面:
删除
删除页面:
if($_POST) {
是表单提交,执行删除
}else {
通过 $_GET['id'] 得到待删除记录,生成删除页面
}