Hi,
I make a delete page with php to delete clients from clients table. With this page I try to delete images from gallery table. for example I wish to delete client ABC from clients table and it have three images in gallery table.
here under I paste the code to delete the specific client and images, when I hit the delete button it goes to deleteclientpage but the specific client and images doesn't delete.
can anyone give me some help to make it work?
if (!empty($_GET["clientid"]))
{
$clientid = $_GET["clientid"];
$query = "DELETE FROM clients, gallery WHERE clients.clientid = $clientid AND gallery.clientid = $clientid";
//change the way the query is called
$db->query($query);
echo "<p id='text'>The client was deleted.</p>";
}
Thanks.
marifard