I have a table that has the following example
I need to delete both but the problem is that I have only post id: "PEzQo82KYTLLoXw" as parameter, how to delete both even when it has a comment?
post_id#comment
PEzQo82KYTLLoXw#comment_id
For while this is my query
$p_id = "PEzQo82KYTLLoXw";
$likes = $pdo->prepare('DELETE FROM likes WHERE post_id = :like_p_id');
$likes->bindParam(':like_p_id', $p_id);
$likes->execute();
since the comment is random, how to also delete all comments linked to it ?
`PEzQo82KYTLLoXw#comment_id`