Simplify insert statements, simplify condition, modifiy existing user, new function for pagination and calculation of total page
Simplified conditions
Modify equation for comment number