I want to delete multiple records with a specified value (non-unique) in one table and delete the record with that same specified value (unique) in another table using a prepared statement. This is what I got,
$stmt = $conn->prepare("DELETE FROM Books WHERE Genre_ID=? AND FROM Library WHERE Genre_ID=?");
$stmt->bind_param("ii", $genreID, $genreID);
The aim of the query would be to delete the specified Genre from the Library table by its ID and, of course, remove all the books from the Books table with that ID.