SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    "Echo" data from a database table depending on the date.

    Hello! I'm a novice programmer attempting to display a "daily health tip" for my company's intranet, wanting it to change daily and I've been looking around trying to figure out the "where" function. In the database, I've got the "id" column setup with the date and then the "text" column with the daily health tip. I have been trying to get the "where" function to act with the current date to get it to switch. I've gone through several other websites attempting to figure this out to no avail. Any assistance with this would be fantastic! Thanks!

  2. #2
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, if it isn't clear by the post, I'm using PHP/MySQL. Thanks!

  3. #3
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,501
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Welcome to the SP forums.

    Please post the table definition and the query you've got so far.

  4. #4
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Would that be a different health tip for each day of the year then?


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
  •