Re: Get equivalents via SQL?

2003-07-09 Thread Becoming Digital
You need a LEFT JOIN.  Check the manual for more info and let us know if you
have any more questions.

Edward Dudlik
Becoming Digital
www.becomingdigital.com


Did I help you?  Want to show your thanks?
www.amazon.com/o/registry/EGDXEBBWTYUU



- Original Message -
From: "motorpsychkill" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, 08 July, 2003 22:35
Subject: Get equivalents via SQL?


I have a table like this (table_gender):

gender_id gender_description
--- 
0 female
1 male



I also have a table like this (table_post):

post_id post_gender1 post_gender2
--- --- 
21 0 1
22 0 0
23 1 0



Is there any way that I can pull a singe row from table_post (for e.g. row
21) and have the results look like:

post_id gender1 gender2
---  
21 female male



Thank you very much!


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





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



Get equivalents via SQL?

2003-07-08 Thread motorpsychkill
I have a table like this (table_gender):

gender_id   gender_description
--- 
0   female
1   male



I also have a table like this (table_post):

post_id post_gender1post_gender2
--- --- 
21  0   1
22  0   0
23  1   0



Is there any way that I can pull a singe row from table_post (for e.g. row
21) and have the results look like:

post_id gender1 gender2
--- 
21  female  male



Thank you very much!


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