我在单个 ID 中添加的图像多于图像,但如果在删除按钮中删除该图像。只有一个图像删除该文件夹其余图像不删除该文件夹。如何删除剩余的图像??????
$sql = mysql_query("select * from urbanesqe_completed_image WHERE id ='".$_GET['del']."'");
////echo "select * from urbanesqe_completed_image WHERE id ='".$_GET['del']."'";
$res = mysql_fetch_array($sql);
$product_image = $res['product_image'];
$image_path = "../images/completed/".$product_image;
unlink($image_path);
mysql_query("DELETE FROM urbanesqe_completed WHERE id ='".$_GET['del']."'");
mysql_query("DELETE FROM urbanesqe_completed_image WHERE id ='".$_GET['del']."'");