php-db | 2004071
Date: 07/06/04
- Next message: Kenny: "[PHP-DB] Warning"
- Previous message: Pablo M. Rivas: "Re[2]: [PHP-DB] Re: MySQL query, using DISTINCT..."
- In reply to: Tristan.Pretty <email protected>: "[PHP-DB] MySQL query, using DISTINCT..."
- Next in thread: Rui Cunha: "[PHP-DB] Re: MySQL query, using DISTINCT..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tuesday 06 July 2004 17:58, Tristan.Pretty <email protected> wrote:
> I have a system that tracks downloads, capturing loadsa info, but of
> interest here, is email and filename.
> Simply put, I wanna show all results where file name AND email are unique.
> (so if email '123 <email protected>' has filename 'word.doc' 5 times in a table,
> I want to only see it once.)
>
> What am I doing wrong...?
Well what did you expect your code to do when you run it, and what is it
actually doing?
Please spend a little time describing your problem clearly and succintly when
posting.
In the absence of more information, my guess is that your biggest problem is
that you're not doing sufficient error checking in your code.
AFAICS ...
> SELECT DISTINCT(file_name, email) FROM `completed_downloads` WHERE `bu` =
> 'reech' AND date BETWEEN '2004-06-01' AND '2004-06-30'
would give a mysql error. The correct syntax is:
SELECT DISTINCT col1, col2, etc FROM table ...
Please follow the examples in the manual and incorporate error checking when
using mysql.
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-db ------------------------------------------ /* Nondeterminism means never having to say you are wrong. */-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Kenny: "[PHP-DB] Warning"
- Previous message: Pablo M. Rivas: "Re[2]: [PHP-DB] Re: MySQL query, using DISTINCT..."
- In reply to: Tristan.Pretty <email protected>: "[PHP-DB] MySQL query, using DISTINCT..."
- Next in thread: Rui Cunha: "[PHP-DB] Re: MySQL query, using DISTINCT..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

