Multiple Like statement

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

  1. #1

    Default Multiple Like statement

    Hi

    I'm trying to create a SELECT with multiple LIKE
    e.g.

    strSQL = "select user from log where workstation like 'fr132' and date =
    curdate() and logout = '00:00';"

    Trouble is there are about 30 different workstations e.g. fr130, 112, etc. So
    I can't imagine the best solutions is to put: Workstation LIKE 'fr132' or LIKE
    'fr130' or LIKE 'fr112'

    I've really been scratching my head with this one.

    Thanks

    Stuart


    stu75 Guest

  2. Similar Questions and Discussions

    1. Difficulties to send multiple object in multiple objectwith SOAP (WebService)
      Hi, I have a problem similar to this one: http://bugs.adobe.com/jira/browse/SDK-12891 I manage to send complex object from flex to web services...
    2. Multiple Sites + Multiple Languages + Unicode with Adobe Contribute ?
      Does Adobe Contributes allows you to maintan content in multiple language (with unicode support) over multiple web site (ie : www.myproduct.com,...
    3. Advanced OOP: Best OO design for rendering multiple page types to multiple devices
      Hoping to get some ideas from more experienced hands regarding the best way to use object-oriented design to assist my development of a content...
    4. Help With Multiple If Statement Syntax
      What am I doing wrong here? I want it to display different messages depending on which MC it finds: scanner.onEnterFrame = function() { if...
    5. multiple "and" in if statement okay?
      my end result, both count and total of sum are incorrect, can someone comment on this statement in the define fields or suggest another way of...
  3. #2

    Default Re: Multiple Like statement

    Hi,
    > Trouble is there are about 30 different workstations e.g. fr130, 112, etc. So
    > I can't imagine the best solutions is to put: Workstation LIKE 'fr132' or LIKE
    > 'fr130' or LIKE 'fr112'
    I think you should use the wildcard for SQL queries - %

    Workstation LIKE 'fr%' AND

    Good luck

    Alexandru
    >
    > I've really been scratching my head with this one.
    >
    > Thanks
    >
    > Stuart
    >
    >
    --
    InterAKT Online - Dreamweaver extensions
    [url]http://www.interaktonline.com/[/url]
    Alexandru COSTIN 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