Re: Most viewed?

From: Date: Tue, 15 Apr 2008 15:45:18 +0000
Subject: Re: Most viewed?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-273002@lists.php.net to get a copy of this message
On Tue, Apr 15, 2008 at 9:41 AM, Steve Marquez <smarquez@ccfortsmith.com> wrote: > Greetings, > > Can any of you point me in the right direction on how to use PHP to create > a > most viewed or most clicked articles list? Can it be done with PHP? are these articles on a site youre creating? it should be pretty simple then. basically, when somebody clicks on a link to an article on the site, drive that request through some php code that increments a counter in the database. then on the page where you show the 'most clicked' its essentially just an ORDER BY most_clicked DESC LIMIT x query. where most_clicked is the field name of the counter, and x is the number of results you want to show; so like for top 3, x=3. -nathan

« previous php.general (#273002) next »