Jump to content
Larry Ullman's Book Forums

josh42

Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About josh42

  • Rank
    Newbie
  1. The example you listed uses mysql queries. Is there not a way to do this using PHP?
  2. Hi. I'm modifying the 'quotes' script in chapter 13 to include a statement before the quotes that indicates a 'new' or 'recent' quote if the quote was entered within the last 30 days. I know I need to use $row[date_entered] (type timestamp in mysql, e.g. 2014-03-09 13:25:11). Is there a function to compare that timestamp with today (in number of days)? Thanks.
  3. Yes, the issue was my db column was set to 'date'. Switching to 'datetime' fixed the problem. Thank you!
  4. I noticed that the NOW() function in chapter 12 only returns time in YYYYMMDD format. Maybe this is the format the database needs, but it creates a problem if I add multiple blog posts a day. The newest ones aren't at the top because NOW() doesn't include minutes and seconds. Is there a better way to send time information to the database? Thank you.
×
×
  • Create New...