cfquery and list form

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default cfquery and list form

    Greeting!

    I have a form that submit MULTIPLE list from the <select> tag. When the list
    had send to action page, I need to run <cfquery> for retrieve data that match
    the contents inside the list.

    Example:

    The value from the list : 2, 7, 10, 13

    How should I write my query??

    should I write

    <cfquery name=query datasource=db>
    select * from tableA
    where items = <contents only match the list>
    </cfquery>

    The result shoudl only show "items" equal to 2 or 7 or 10 or 13 only....

    I had stuck here....HELP ME!!!!

    Thank you.

    ky_loh Guest

  2. Similar Questions and Discussions

    1. Searching a column containing a list against a form list
      I have a form that allows users to select multiple items from a list. form.hobbies = 1,5,3,6,8,2 (from a table pullup) I want to be able to...
    2. Using form variable in a CFQuery
      In my Access database are two tables - tblreg_info and tblcourse_description. They are linked via a primary key, ref_no, in the course_description...
    3. Form and CFQUERY/CFUDATE
      hello all! I am stumped as to what this error is: Element FIRSTNAME is undefined in FORM This is an attempt to update a record, using cfquery. ...
    4. cfquery errors on Package or function LIST is in an invalid state
      I am trying to understand an error I got from my cfquery I created a function using TOAD like: create or replace function list ( field1 number...
    5. Switching to Form or list
      Hey could some tell me why sometimes a small script works for switching to Form View to List View works and sometimes it doesn't switch Show All...
  3. #2

    Default Re: cfquery and list form

    where items IN (<contents only match the list>)

    Ken

    The ScareCrow Guest

  4. #3

    Default Re: cfquery and list form

    The list is passing the value through the multiple selection form tag <select
    multiple>

    so when the user select a few item in the form anc click "submit"
    my display page should run query that refering only the particular values
    only.....



    ky_loh Guest

  5. #4

    Default Re: cfquery and list form

    ok..........................................i get it...thank you
    ky_loh 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