$sil = $vt->prepare("DELETE FROM urunler WHERE hesap_uid =?");
$islem = $sil ->execute(array($gelenid)); 2 sorgu ile olur
Tek sorguda yapılabilir.
<?php
define("IN_ADMIN",1);
require_once "ayar.php";
$gelenid = $_GET["uid"];
$sil = $vt->prepare("DELETE hesaplar,urunler FROM hesaplar INNER JOIN urunler ON hesaplar.uid = urunler.hesap_uid WHERE hesaplar.uid = ?");
$islem = $sil ->execute(array($gelenid));
?>