April 23rd, 2012, 01:12 PM
Anonimous Posting Solution
I am doing PHP and MySQL based site, where visitors can post without registration. But I want them to confirm email after posting. And Post will be displayed just after admin will confirm it.
First I decide to do like this:
id | post | email | etc.
post_id | confirmed by visitor | confirmed by admin
After confirmation Table B row will be deleted. If post is not here, means it was confirmed.
But now I realize, to display posts, I always need to join both tables to check if its confirmed.
I dont think its very optimal.
I think about 2 other options now:
id | post |...| confirmed by vis | confirmed by admin
again, it query I need to check post is confirmed or not, but at least dont need to join.
Or 2 tables, One for confirmed posts, and second for not confirmed. Posts from 2 table would be transferred to 1 table after confirmation, or deleted if no.
April 23rd, 2012, 01:47 PM