Hi there
i have a problem building a site with news
table news
news_id, news_title, news_date, news_category
now, i want to present the 5 most popular articles based on clicks (views) of every article in a place of the main page.
The page that displays the articles is e.g. article.php?news_id=453
Also, i need to find a solution to present the 5 most related articles to the one is viewed.
Please ... urgent need for help ...
Most Popular / Related Articles
Moderator: General Moderators
-
greenyeyes26
- Forum Newbie
- Posts: 4
- Joined: Wed Aug 08, 2007 2:14 pm
-
greenyeyes26
- Forum Newbie
- Posts: 4
- Joined: Wed Aug 08, 2007 2:14 pm
More specifically
Thanks for help ..
I'm just trying to find how i will implement this view count for the last 7 days ... (for the most popular)
I'm just trying to find how i will implement this view count for the last 7 days ... (for the most popular)
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
You'll need to log date and time requests for each page. Depending on how you want to do it, a query could either update an aggregate count column in another table with the current information, or the query to aggregate the information could be done live. Personally, I would go with the former over the latter.
-
greenyeyes26
- Forum Newbie
- Posts: 4
- Joined: Wed Aug 08, 2007 2:14 pm
Trying to get out of chaos ...
Thanks friend ... I just don't know the code to log the date and time of the articles. I could go for the first solution also .. if i knew the way
Thanks again...
Thanks again...
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm