mysqli->查询删除没有工作

时间:2015-06-24 12:54:57

标签: php mysql mysqli

$mysqli=new mysqli($sqlhost,$sqlusername,$sqlpw,$sqldbname);
    $mysqli_del=new mysqli($sqlhost,$sqlusername,$sqlpw,$sqldbname);
    if($delete_image){
        $image_in_album=$mysqli->query("select * from albums_detail where albumid='$albumid'");
        while($row=$image_in_album->fetch_assoc()){
            $imgid=$row['imgid'];
            $mysqli_del->query("delete from imgs where imgid='$imgid'");//Not work
            unlink('data/imgs/'.$imgid);
            unlink('data/thumbs/'.$imgid);
        }
    }
    $mysqli->query("delete from albums_detail where albumid='$albumid'");
    $mysqli->query("delete from albums where albumid='$albumid' and userid='$userid'");
    $mysqli->close();

  

$ mysqli_del->查询("从imgs中删除imgid =' $ imgid'");

不工作?怎么了?

0 个答案:

没有答案