Never Mind. Found a solution elsewhere. The comments table was broken for some reason. The CommentID field was not Primary Key anymore and Autoincrement was turned off. Default value was being set to 0.
I updated the table to make CommentID Primary Key and set it to autoincrement. It solved the issue.