Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

insert a row in a query

New Here ,
Nov 23, 2006 Nov 23, 2006
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!
TOPICS
Advanced techniques
297
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 23, 2006 Nov 23, 2006
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:
>...
Translate
LEGEND ,
Nov 23, 2006 Nov 23, 2006
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!
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 23, 2006 Nov 23, 2006
LATEST
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!
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources