i want that when someone post some comment on post that don’t insert in table directly before inserting i can check and after approving then insert in table for which what i doo ?any IDea about this
Sure, have a flag in your comments table to indicate whether to show it or not.
INSERT INTO table (id, comment, is_enabled) VALUES (null, 'Hey!', false);
In this example, you would change is_enabled to true to ‘authorise’ the comment.
and then how i’ll approve all post ?which will not be showing ?
mean can u desribe in details ho can i have on my comment table ? is this any bill tin function or what ?
Well, initially you only ask the database for only comments which are ‘enabled’.
SELECT comment FROM table WHERE is_enabled = true
To enable a comment, you use its id in the following query.
UPDATE table SET is_enabled = true WHERE id = 1
hmmm well i think i got i create one extra colum where i put this condition
Yep.
thankss