All,

I have done some reading and research; however, I
seem to be at a loss...

And this time, I am not sure how to ask Google...

Here is the problem:

Table A:   id       INT
           value    varchar (10)

Table B:   id       INT
           value    varchar (10)

Table C:   id       INT
           A        INT
           B        INT
           D        INT

Table D:   id       INT
           ...
           other_values

Table C is in order to "normalize" values for A and B

So, I want to be able to do a query to C that returns
the id values of D in order to cross reference that
table later.

Since table C only knows the numeric values of the
string, I need to be able to do so as part of the
query by comparing C.a with A.id; however, I also
need to compare with the value string...

Now, I can do that with one table (A, for example):

mysql> select C.D from C, A
    -> where C.a = A.id AND A.value='berry';

However, I am not sure how to add the next condition:

    -> where C.b = B.id AND B.value='fruit';

That would allow me to obtain the values on C where
A.value = berry and B.value = fruit; however using
the numeric values of A.id and B.id

There most be a simple solution...

To add to the problem, I am using MySQL 4.0.15, so the
multiple select would not work...

Any help would be appreciated as I have little hair 
left!!!

Beforehand, thank you for the help!


        
                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to