$conn=new

站在用戶的角度思考問題,與客戶深入溝通,找到烏拉特后網(wǎng)站設(shè)計(jì)與烏拉特后網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗(yàn),讓設(shè)計(jì)與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個性化、用戶體驗(yàn)好的作品,建站類型包括:成都網(wǎng)站制作、成都做網(wǎng)站、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣、域名申請、虛擬空間、企業(yè)郵箱。業(yè)務(wù)覆蓋烏拉特后地區(qū)。
mysqli('localhost','root','pwd','database');//連接數(shù)據(jù)庫
$conn-query("mysql命令");//執(zhí)行數(shù)據(jù)庫命令
$result=$conn-query("select
*
from
table
where
name='
'
and
password='
'");
$row=$result-fetch_array();//得到查詢結(jié)果
if($row!=null){
$isok=$conn-query("delete
*
from
table
where
name='
'
and
password='
'");
}
echo
$isok==1?"刪除成功":"刪除失敗";//三元表達(dá)式,可以用if
else代替
刪哪些表一個個刪啊 如果uid是唯一的話 要limit 1
delete * from xxxx where uid = xxxx
后臺的作用是使 不懂技術(shù)的客戶 用戶能夠很方便的對網(wǎng)站的內(nèi)容進(jìn)行添加、編輯。
用戶的操作最后是通過php來對數(shù)據(jù)庫進(jìn)行增刪改查!
if($action == "list")
{
$password=md5($password);
$flag=arraycount($flag);
$result=$db-getstate("insert into admin(username,password,quanxian) values('$username','$password','$flag')");
$db-db_close();
if($result)
{
alert("信息添加成功","list.php","this");
}
}
if($action == "del")
{
//exit("delete from admin where id in ($id)");
$result=$db-getstate("delete from admin where id in ($id)");
$db-db_close();
if($result)
{
alert("刪除成功","list.php","this");
}
}
if($action == "del")
{
//exit("delete from admin where id in ($id)");
$result=$db-getstate("delete from admin where id in ($id)");
$db-db_close();
if($result)
{
alert("刪除成功","list.php","this");
}
}
慢慢看 看不懂追, 我想一定能幫你解決問題。
新聞名稱:php數(shù)據(jù)庫刪除用戶 php數(shù)據(jù)庫刪除用戶id
本文URL:http://www.chinadenli.net/article32/dooipsc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供電子商務(wù)、網(wǎng)站設(shè)計(jì)、網(wǎng)站改版、軟件開發(fā)、云服務(wù)器、微信小程序
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)