SQL删除某条记录
<ahref="../delete.php?id=<?phpecho$value['id']?>"()">删除</a>想在delete.php做接收删除操作删除表(adm...
<a href="../delete.php?id=<?php echo $value['id'] ?>" ()">删除</a>想在delete.php做接收删除操作 删除 表(admin) 里 id = 接收到id的值
展开
2个回答
2013-07-14
展开全部
$conn = mysql_connect ( "localhost", "root", "" );
mysql_select_db ( "test" );
$uid = $_GET [id];
$sql = "delete from admin where uid = {$uid}";
$bo = mysql_query ( $sql );
if ($bo) {
echo "删除成功";
} else {
echo "删除失败";
}
mysql_select_db ( "test" );
$uid = $_GET [id];
$sql = "delete from admin where uid = {$uid}";
$bo = mysql_query ( $sql );
if ($bo) {
echo "删除成功";
} else {
echo "删除失败";
}
2013-07-14
展开全部
delete from table where id = {$uid};
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询