I do not think that this can be solved using only SQL. Your system design my
require you to use one query for the display and another
for edit checking in order to achieve your goal.

Chris Toth wrote:

> Kentj
>
> Ok, I understand. I thought DISTINCT only worked on the field listed
> directly after it in the SELECT string. Hmmm, this raises a new problem.
> Because I only need to chop the duplicates from 'request.id' , but the
> other fields can have duplicates (for example the same professor might have
> more than one request). Man, this SELECT logic is driving me nuts. I have 2
> books on MySQL and I still can't figure this one out.
>
> Thanks,
> Chris
>
> At 11:58 AM 3/7/2001 -0700, you wrote:
> >  Your query selects eight fields. Your Display shows five fields. The
> > distinct verb
> >works on all eight fields and
> >apparently some of the fields not displayed are different. Limit the query
> >for the
> >display to the five fields displayed
> >and the distinct verb should eliminate the duplicates from the display.
> >You may
> >need to  keep your current query
> >as it is for the editing purposes that you stated but if you use this
> >query for the
> >display it will continue to show the duplicates.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to