I have a question on the following query statement:

SELECT content_title, content_category, content_order, content_name1
FROM content INNER JOIN category ON content.content_category = category.category_id
WHERE content_category = 'Intbk'
Union
Select content_title, content_category, content_order, content_name1
from content, category
where category.category_id = 'Intbk' AND content.content_common IN 
(category.category_common)
Order by content.content_order

**********************************************************************************************************************************************************************************

The two field that are giving me trouble are the one above that are in the color 
maroon.

1. category.category_common is a Varchar defined field in the table category 
containing the data -> 2,3
2. content.content_common is a int defined field in the table content. 
Content.content_common 
contains multiple rows containing either 2 or 3. 

The problem that I am having is that the content.content_common IN 
(category.category_common) portion in the 
above query is only returning those data fields from the content.content_common column 
that contain the number 2.
Content.content_common is not returning any of the four content.content_common data 
field that contain a 3.

I know that I cannot use a sub-select with this version of MySql. 

Anyone have any ideas what I'm doing wrong?

Thanks In Advance.

Lenny Sorey



My platform is as follows:

Win 2k Professional, MySQL-Max 4.0.3, MyODBC-3.51.03



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