Results 1 to 2 of 2

Thread: joins

  1. #1
    Join Date
    Dec 1969

    Default joins

    I always get stuck. I try code I used & working, but it will not work. Ok so here is my question.<BR>Database - Access<BR>I&#039;ve 3 tables<BR>CAtegory - where categorynames are stored. <BR>fields: categoryid - datatype - text<BR>Description - Name of category - datatype - text<BR><BR>Second table<BR>Promocategory - which shows only those category wchich has promotion going on.<BR>Fields: pcatid - comes from categoryid table<BR>psubcatapp - If subcategory applies datatype y/n<BR><BR>Third table<BR>promoscat_catapp<BR>for some of these categories, subcategories are applied. So this table stores that information.<BR>fields<BR>prsscatapp - subcategoryid comes form promotional subcategory<BR>prscatapp - categroy id to which subcategory is applied.<BR><BR>Now I want to display all promotional category. That can be done by sql statement below<BR>sql = "select categories.*, promocategory.* from categories, promocategory where categories.categoryid = promocategory.pcatid " <BR><BR>now how can I show categories which are selected as checked and categories not selected not checked. Category name will be displayed as checkbox. <BR> I&#039;m not quite sure as how to connect third table promoscat_catapp, so that it checks if catgoryid is in that table and subcategoryid(i&#039;ve do have that value passed from earlier page) = to subcategory id in the table.<BR><BR>Any help will be greatly appreciated.<BR>I&#039;ve always received help on this board for related question, got it anserwed. I&#039;ve tried all those sql statment but can&#039;t make it work. <BR>Thanks in advance

  2. #2
    Join Date
    Dec 1969

    Default HUH?

    &#062; how can I show categories which are selected as checked <BR><BR>selected WHERE????<BR><BR>In the SELECT statement? *ALL* the categories are selected by it.<BR><BR>What are you talking about?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts