select * from MEMBERS,FEE_PAYMENTS where FEE_PAYMENTS.price < '1' 
and MEMBERS.memberID = FEE_PAYMENTS.memberID;

am I getting close? :o)

Mark

>The FEE_PAYMENTS table does not have one line corresponding to each line in the 
>MEMBERS table.
>
>The members table can look like this:
>
>MEMBERS
>ID | NAME | BIRTHDAY | etc...
>1 | Art Garfunkle | 1940-05-02 | 
>2 | Torkil Johnsen | 1980-05-26 |
>3 | Bill Clinton | 1956-02-12 |
>4 | Madonna | 1962-08-02 |
>5 | Rune Araber | 1954-12-17 |
>
>And the fee_payments table can look like this:
>
>FEE_PAYMENTS
>ID | MEMBER_ID | PRICE
>1 | 2 | 500
>2 | 4 | 750
>
>So as you can see, only "Torkil Johnsen" and "Madonna" has paid their fees, 500 and 
>750 respectively.
>
>Now I want to list the people that have not paid their fees... How would you do this?
>
>
>- Torkil :)
>
>----- Opprinnelig melding ----- 
>Fra: Mark Dale <[EMAIL PROTECTED]>
>Til: Torkil Johnsen <[EMAIL PROTECTED]>
>Kopi: <[EMAIL PROTECTED]>
>Sendt: 17. april 2002 11:17
>Emne: Re: Problem with query
>
>
> > 
> > select * from MEMBERS,FEE_PAYMENTS where FEE_PAYMENTS.PAID = '0' and MEMBERS. 
>MemberID = FEE_PAYMENTS. MemberID;
> > 
> > assuming you have a field PAID, with values 0 or 1,or even YES or NO
> > 
> > cheers
> > 
> > Mark
> > 
> > >I am having a small problem with a small mysql query...
> > >
> > >I want to make a list of:
> > >"WHO HAS NOT PAID THEIR MEMBERSHIP FEE".
> > >
> > >I guess I could maybe solve this one myself, its not too hard ...
> > >
> > >I have one table with members
> > >
> > >MEMBERS
> > >------------------------------------------
> > >| MemberID | Name |  etc.....
> > >
> > >
> > >One table with fee payments
> > >
> > >FEE_PAYMENTS
> > >------------------------------------------
> > >| MemberID | date | price |  etc...
> > >
> > >
> > >Now: How would I make a query that would list all members that have not paid 
>their fee?
> > >How would I make a query that would list all members that have paid their fee?
> > >
> > >I'm just too tired to think it out myself :)
> > >Forgive me :)
> > >
> > >-------------------------
> > >Med vennlig hilsen,
> > >Torkil Johnsen
> > >
> > >[EMAIL PROTECTED]
> > >-------------------------
> > >
> > >
> > >---------------------------------------------------------------------
> > >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
> > 
> > 


---------------------------------------------------------------------
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