1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Rep Power

    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:
    Table A:
    id | post | email | etc.
    Table B:
    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:
    One table:
    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.
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Toronto Canada
    Rep Power
    single table
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

IMN logo majestic logo threadwatch logo seochat tools logo