A true database query

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

  1. #1

    Default A true database query

    Hello All, I am try to create a dynamic search page where the admin would
    create the fields or dropdowns for the user to select. For this example, we'll
    say a dropdown for month (01, 02, 03, etc.) and year (2001, 2002, 2003, etc.).
    now on the next page I want the admin to be able to enter information into four
    separate textarea boxes. They are QUERY OR SPOC, WHERE STATEMENT, GROUP BY
    STATEMENT and ORDER BY STATEMENT. This is what I would like for them to be
    able to enter: QUERY OR SPOC: Select var1, var2, FROM TABLE222 WHERE
    STATEMENT: where month = #form.month# AND year = #form.year# GROUP BY: VAR1,
    VAR2 When the form posts, it uses where month = #form.month# AND year =
    #form.year# instead of plugging in the month and year value. The problem
    occurs in the where statement. I have tried Evaluate(), using single quotes,
    double quotes etc. It will Does anyone have any ideas??? Thanks!!!!

    DettCom Guest

  2. Similar Questions and Discussions

    1. #39817 [NEW]: curl_setopt/curl_setopt_array returns true for CURLOPT_FOLLOWLOCATION => true i
      From: php_dot_net at edelhost dot de Operating system: Linux 2.6.18.k7 PHP version: 5.2.0 PHP Bug Type: cURL related Bug...
    2. #26232 [Opn->Bgs]: in_array produces true when bool true is in haystack
      ID: 26232 Updated by: jay@php.net Reported By: me at my dot house -Status: Open +Status: Bogus Bug...
    3. #26232 [Bgs->Opn]: in_array produces true when bool true is in haystack
      ID: 26232 Updated by: helly@php.net Reported By: me at my dot house -Status: Bogus +Status: Open...
    4. #26232 [Opn->Ver]: in_array produces true when bool true is in haystack
      ID: 26232 Updated by: helly@php.net Reported By: me at my dot house -Status: Open +Status: Verified...
    5. No true Crosstab Query in Oracle???
      Gavin John Fowler wrote: Cross-tabulation is easily accomplished using DECODE and CASE. Just alias the resulting columns. To handle an...
  3. #2

    Default Re: A true database query

    In general, Evaluate() will not work for this sort of thing. It's ugly, but
    usually all you can do is write out the code to a file (dynamically using
    CFFILE) and then CFINCLUDE it back into the processing document to make it
    execute.

    Bryan


    blewis Guest

  4. #3

    Default Re: A true database query

    Can you post some code?

    eastinq Guest

  5. #4

    Default Re: A true database query

    That worked!!! Thanks.
    DettCom 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