Reply to Re: Distinct Name with date Order by date

Your name:

Reply:


Posted by Rik Wasmus on 11/28/07 19:50

On Wed, 28 Nov 2007 20:40:01 +0100, <rojelio@gmail.com> wrote:

> Here's my issue. I'm tracking product interest so to speak. Each
> time a user clicks on a product the userid, product id, and date is
> tracked. Now users usually look at their products of interest several
> times. So everytime they click the same product it is tracked as
> well.
>
> So as an administrator I want to look at the product to see who's
> checked it out and how many times (ie interest level).
>
> Here's what I have now
> A.A. - Last Access: 11-12-2007 Total: 2
> B.B. - Last Access: 11-26-2007 Total: 2
>
> I can onlly get distinct user and order by name. Then while looping
> get the last access date.
>
> But I want the most recent person whos looked at the product to be on
> top and don't want see A.A... multiple times.

Sure, prefectly possible in just one query.

comp.databases.<flavour of your database>
or possibly:
alt.php.sql
(allthough the latter is not in my list, so I won't see it)
--
Rik Wasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация