In mysql, I have a variable, "views," which counts page views for each db entry. "Views" is used to create a variable, in PHP, called "$popular." "$popular" displays db by total since the entry was first made. See the display, on this page, at the top right -- http://grubstreet.ca. Is it possible to limit the display to only page views, of a db entry, that occurred today, this week or this month, rather than from day one? If so, where would I find out how to do this, correctly?
Yes it's possible, but you'll have to record set of views for each year/month/day. Since your not looking to analyze each view, I'd suggest setting up a table structure like: grub_views: ------------------------ | gdate | views | ------------------------ | 2011-05-29 | 319 | | 2011-05-30 | 19 | ------------------------ Code (markup): And then retrieve records normally by your choice of either month or by day or by week.
Hi X ... thanks for your input. I have a variable, "published," whilch is yyyy-mm-dd. From what you write, I suspect I can dispaly by date, date. If true, I can't figure out how to do it. What advice do you offer. Many thanks. dgp