I've created two tables, simplecomments
and commentors
, and joined them with INNER JOIN on commentors.id = simplecomments.commentorid
.
Commentors
is the personal info of a commenter with following columns: number(id), name, email..
Simplecomments
is details of each and every commenter, containing comment, reg_date, commentorid, deliverytype, rating...
I've joined them successfully, however I'm finding it hard to delete from the joined table.
I want to make it like this:
if there's last row of a commentor
called.. let say A, then delete both his comment details and A himself from the table.
Else if A has commented plenty of times, (with different comments), delete his comment details, but let his personal info remain since he, A, has other comments there..
How should I proceed?