RE: [PHP] need help for a where clause
| From: | David Freeman | Date: | Sun, 06 Oct 2002 23:09:38 +0000 |
| Subject: | RE: [PHP] need help for a where clause | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119024@lists.php.net to get a copy of this message | ||
> I need a where clause in following situation:
>
> Say I want to query two tables: A and B. In table A there is field
> Afn, while in table B there are 3 fields: Bfn1, Bfn2 and
> Bfn3. I want
> to do a query, in which the where clause must do these things:
>
> if A.Afn=1, then check value of B.Bfn1;
> if A.Afn=2, then check value of B.Bfn2;
> if A.Afn=3, then check value of B.Bfn3.
>
> So how can I create such a where clause to do this?
I suspect you'd be better off asking this question in a mailing list for
whatever database you are using. At the very least, it would probably
help to mention the database but it's still not real relevant here in
this (already high volume) mailing list.
CYA, Dave