CFPARAM Query syntax

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default CFPARAM Query syntax

    Can anyone tell me the proper syntax to enter a query into a cfparam variable??
    I would like to put the result of the query Recordset3 into the variable
    NavName. <cfquery name='Recordset3' datasource='triac'> SELECT Category FROM
    Navigation WHERE NavID = #URL.NavNum# </cfquery> <cfparam name='NavName'
    default=#recordset3.category.navigation.NavID# type='Query'> Thanks so much!

    Creasiamedia Guest

  2. Similar Questions and Discussions

    1. Query of Queries syntax issue
      I have query 1 which has a list of names and query 2 which has ratings for the names. Every rating from query 2 has a name in query 1, but not...
    2. Query Syntax
      HI, Can someone give me a few poitners on the most efficient uses of QUERY.... e.g if there are several query's on one page would it be best to...
    3. Variable Syntax Query
      I'm building a button bank of 6 buttons whereby pressing one button releases the last button activated. Each button is it's own movie clip named...
    4. Can some help me with the syntax, ADo.net C# dataset query
      hi every body i need help i have a dataset called ds, which contains a table called login_table, which contains three columns, namely (login,...
    5. SQL Syntax Query - sorry
      Colin, Working simply with what you gave us (as opposed to what you might be doing in the end). Why not try: desc family Name ...
  3. #2

    Default Cfparam query syntax

    Can anyone tell me the proper syntax to enter a query into a cfparam variable??
    I would like to put the result of the query Recordset3 into the variable
    NavName. <cfquery name='Recordset3' datasource='triac'> SELECT Category FROM
    Navigation WHERE NavID = #URL.NavNum# </cfquery> <cfparam name='NavName'
    default=#recordset3.category.navigation.NavID# type='Query'> Thanks so much!

    Creasiamedia Guest

  4. #3

    Default Re: Cfparam query syntax

    assuming the following: <cfquery name='qryName' datasource='mydatasource'>
    SELECT column1, column2, column3 FROM tablename WHERE column1 = #your criteria#
    </cfquery> you want the following syntax: <cfparam name='myparam1'
    default='#qryName.column1#'> <cfparam name='myparam2'
    default='#qryName.column3#'> etc Hope this helps.

    tphethean Guest

  5. #4

    Default Re: CFPARAM Query syntax

    You can do these to copy the whole query into a variable
    <CFSET NavName = recordset3>
    <CFSET NavName = Duplicate(recordset3)>

    Should just be able to use that in CFPARAM like <cfparam name="NavName"
    default="#recordset3#" type="Query"> but have never actually tried it .

    Zoe

    zoeski80 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