Complicated variable

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

  1. #1

    Default Complicated variable

    I have a database query, which i output and also use 2 loops in.
    optionx and qtyx are loop index's.

    i want to use those loop index's to output a value that is in the db query.

    eg: in the database there is a table column called Product13
    the value of optionx has looped to 1 and qtyx looped to 3.
    how can i display the value of this column through something like
    Product#optionx##qtyx#


    xSeanx Guest

  2. Similar Questions and Discussions

    1. Complicated Image Map + Rollover
      I have a jpg of a map and I'm trying to create a image map on top of that with lots and lots of hotspots which when clicked pop up text which does...
    2. Complicated text flow
      Please see the this example at <http://iwillglo.com/practice/overset.html> I have a journal that is set up as shown in the example with article...
    3. Complicated Insert
      I have several rows of data in a table which i want to insert into only 1 row in another table. Is it possible to do an insert query from a select...
    4. pattern need help... so complicated
      hi, need some help over how to create this pattern... <http://img47.photobucket.com/albums/v144/kylekwan/pattern.jpg> I'm using AI 10. Have...
    5. A bit more complicated....
      can any one help me with this ? if i press the button refresh in my browser my movie stop playing i tried to insert a rewind in my script but it...
  3. #2

    Default Re: Complicated variable

    You can use the "Evaluate" function for variable variable names.

    #Evaluate("Product" & optionx & qtyx)#

    Can you provide a bit more information on what exactly is going on. Seems
    like there should be a better way to accomplish what you're trying to do.

    BSterner Guest

  4. #3

    Default Re: Complicated variable

    > Product#optionx##qtyx#

    queryName["Product#optionx##qtyx#"][row]

    Don't use evaluate() if you can possibly avoid it (generally you CAN avoid
    it): it adds a lot of processing overhead.
    --

    Adam
    Adam Cameron 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