SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast szigeti's Avatar
    Join Date
    May 2005
    Location
    Hungary
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Create separate view for unregistered forum readers?

    I have a custom-designed message board in which unregistered readers can only see posts that are older than a day.

    The forum software accesses the posts via a view so the select query is very simple in the application.

    Should I create a separate view for the posts that are available for everyone (by defining the required age in the where clause) or should I just add a field which calculates the age of the posts and filter out the immature ones at every select query?
    Eat healthy,
    Exercise daily,
    Die anyway.

  2. #2
    SitePoint Wizard guelphdad's Avatar
    Join Date
    Oct 2003
    Location
    St. Catharines, ON Canada
    Posts
    1,708
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    neither.

    your table currently has a date field right? Check whether the user is logged in or not and then run a query on the whole table and if the user isn't then query based on the older records.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •