Looks OK... by not working, I assume you mean that you get no results returned.

You might add:

    sub_categories.cat_id

to your SELECT clause and remove the WHERE clause...

You will see what the actual data is (could be a lot of data).

HTH

Dick

At 2:19 PM +0100 5/14/2000, WL wrote:
>Hi,
>
>Is this OK for a SQL query?  The 2 tables in question are categories and
>sub_categories.  Everything seems ok, but it's not working..
>
><cfquery name = "cats" datasource = "localads">
>     Select categories.ID, categories.cat_name, sub_categories.sub_id,
>sub_categories.sub_name, sub_categories.sub_descript
>
>  FROM categories,sub_categories
>
>   WHERE sub_categories.cat_id = categories.ID
>
>
></cfquery>
>
>Thanks,
>
>Will
>
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to