josh42
-
Posts
5 -
Joined
-
Last visited
Posts posted by josh42
-
-
The example you listed uses mysql queries. Is there not a way to do this using PHP?
-
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.
-
Yes, the issue was my db column was set to 'date'. Switching to 'datetime' fixed the problem. Thank you!
-
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.
How To Compare Timestamp To Today?
in PHP for the Web: Visual QuickStart Guide (4th Edition)
Posted
Thank you for the link. This is a helpful example.