2 Replies Latest reply on Nov 23, 2006 1:55 PM by Newsgroup_User

    insert a row in a query

    tragik
      for the sake of handling a query result in one output, i need to add a manually entered row in an existing query result.

      example:
      select field_1, field_2, field_3
      from table_a

      results:
      r1f1, r1f2, r1f3
      r2f1, r2f2, r2f3
      r3f1, r3f2, r3f3

      before processing the result in a cfoutput statement i want to add a result of:
      r4f1, r4f2, r4f3
      this would not actually exist in the database, hence the manual entry.

      thanks for the help!
        • 1. Re: insert a row in a query
          Level 7
          Did not test but should work.

          <cfscript>
          queryAddRow(queryname);
          querySetCell(queryname,'field_1','r4f1','field_2','r4f2','field_3','r4f3');
          </cfscript>



          "tragik" <webforumsuser@macromedia.com> wrote in message
          news:ek52ud$t2o$1@forums.macromedia.com...
          > for the sake of handling a query result in one output, i need to add a
          > manually
          > entered row in an existing query result.
          >
          > example:
          > select field_1, field_2, field_3
          > from table_a
          >
          > results:
          > r1f1, r1f2, r1f3
          > r2f1, r2f2, r2f3
          > r3f1, r3f2, r3f3
          >
          > before processing the result in a cfoutput statement i want to add a
          > result of:
          > r4f1, r4f2, r4f3
          > this would not actually exist in the database, hence the manual entry.
          >
          > thanks for the help!
          >


          • 2. Re: insert a row in a query
            Level 7
            More like this


            <cfscript>
            queryAddRow(queryname);
            querySetCell(queryname,'field_1','r4f1');
            querySetCell(queryname,'field_2','r4f2');
            querySetCell(queryname,'field_3','r4f3');
            </cfscript>


            "tragik" <webforumsuser@macromedia.com> wrote in message
            news:ek52ud$t2o$1@forums.macromedia.com...
            > for the sake of handling a query result in one output, i need to add a
            > manually
            > entered row in an existing query result.
            >
            > example:
            > select field_1, field_2, field_3
            > from table_a
            >
            > results:
            > r1f1, r1f2, r1f3
            > r2f1, r2f2, r2f3
            > r3f1, r3f2, r3f3
            >
            > before processing the result in a cfoutput statement i want to add a
            > result of:
            > r4f1, r4f2, r4f3
            > this would not actually exist in the database, hence the manual entry.
            >
            > thanks for the help!
            >