Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default brain fart

    I can not for the life of me remember how to do the following: I want my
    recordset to display the following: SELECT * FROM INVENTORY WHERE TYPE = 'NEW'
    AND SUBTYPE = 'CLASS A' OR SUBTYPE = 'CLASS B' OR SUBTYPE = 'CLASS C' When I
    do this, it selects those subtypes, but it is pulling both 'New' & 'Used'.
    Please advise. Also, is it bad coding to rename Repeat1 to something unique
    like RepeatNEWINVENTORY?

    WebSlave Guest

  2. Similar Questions and Discussions

    1. My tiny brain has melted
      I have read through the help information supplied with Dreamweaver but I just dont get it. I have a website that is created on a remote server...
    2. Brain image - Difficult
      I'm attempting to make a very difficult image. I want to create a brain. I would like it to be VERY realistic with all the texture. Does anyone have...
    3. HELP!!! Director is rotting my brain!
      I'm sure I'm going about this the wrong way. I have a swf in the background that you view through a window. On different buttons it changes...
    4. ASP/SQL Syntax Brain FART!
      Hey, could someone remind me how to do this? I want to select a client from TABLE1 where their sub_id is equal to 'O' or 1? For some reason I...
    5. Racking my Brain!
      My site consits of several pages that are linked together to show samples of my work. From the homepage the user clicks "enter site" which opens a...
  3. #2

    Default Re: brain fart

    SELECT * FROM INVENTORY WHERE TYPE = 'NEW'
    AND SUBTYPE = 'CLASS A' OR TYPE = 'NEW' AND SUBTYPE = 'CLASS B' OR TYPE =
    'NEW' AND SUBTYPE = 'CLASS C'

    I think, but I haven't finished my morning coffee yet :-)


    "WebSlave" <webforumsuser@macromedia.com> wrote in message
    news:d19gu5$h1c$1@forums.macromedia.com...
    >I can not for the life of me remember how to do the following: I want my
    > recordset to display the following: SELECT * FROM INVENTORY WHERE TYPE =
    > 'NEW'
    > AND SUBTYPE = 'CLASS A' OR SUBTYPE = 'CLASS B' OR SUBTYPE = 'CLASS C'
    > When I
    > do this, it selects those subtypes, but it is pulling both 'New' &amp;
    > 'Used'.
    > Please advise. Also, is it bad coding to rename Repeat1 to something
    > unique
    > like RepeatNEWINVENTORY?
    >

    Anthony Brown Guest

  4. #3

    Default Re: brain fart

    As Anthony says, you have to specify the New part in each OR clause.

    Also, this is off-subject, but you'll get better performance if you avoid
    using the asterisk. Just name all the fields that you want in your SQL
    statement.


    "WebSlave" <webforumsuser@macromedia.com> wrote in message
    news:d19gu5$h1c$1@forums.macromedia.com...
    > I can not for the life of me remember how to do the following: I want my
    > recordset to display the following: SELECT * FROM INVENTORY WHERE TYPE =
    'NEW'
    > AND SUBTYPE = 'CLASS A' OR SUBTYPE = 'CLASS B' OR SUBTYPE = 'CLASS C'
    When I
    > do this, it selects those subtypes, but it is pulling both 'New' &amp;
    'Used'.
    > Please advise. Also, is it bad coding to rename Repeat1 to something
    unique
    > like RepeatNEWINVENTORY?
    >

    middletree Guest

  5. #4

    Default Re: brain fart

    Try Enclosing the subtype selections in ()

    SELECT * FROM INVENTORY WHERE TYPE = 'NEW' AND (SUBTYPE = 'CLASS A' OR
    SUBTYPE = 'CLASS B' OR SUBTYPE = 'CLASS C')

    --
    Kevin Marshall
    WebXeL.com Ltd
    [url]http://www.webxel.com[/url]

    ASP.NET Dreamweaver Extensions
    [url]http://www.webxel-dw.co.uk[/url]
    "WebSlave" <webforumsuser@macromedia.com> wrote in message
    news:d19gu5$h1c$1@forums.macromedia.com...
    >I can not for the life of me remember how to do the following: I want my
    > recordset to display the following: SELECT * FROM INVENTORY WHERE TYPE =
    > 'NEW'
    > AND SUBTYPE = 'CLASS A' OR SUBTYPE = 'CLASS B' OR SUBTYPE = 'CLASS C'
    > When I
    > do this, it selects those subtypes, but it is pulling both 'New' &amp;
    > 'Used'.
    > Please advise. Also, is it bad coding to rename Repeat1 to something
    > unique
    > like RepeatNEWINVENTORY?
    >

    Kevin Marshall Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139