Skip to main content
Known Participant
May 12, 2014
Answered

How can i divide values in a query output?

  • May 12, 2014
  • 1 reply
  • 263 views

I have this code:

<cfoutput query="GetResults">

  <tr>

  <td nowrap="nowrap">#csedept_name#</td>

  <td nowrap="nowrap">#question_1#</td>

  <td nowrap="nowrap">#question_2#</td>

  <td nowrap="nowrap">#question_3#</td>

  <td nowrap="nowrap">#question_4#</td>

  <td nowrap="nowrap">#question_5#</td>

  <td nowrap="nowrap">(#question_1#/#question_2#)</td>

  </tr>

In line 9 I dont get the answert i would like i actually get the value of question_1 and question_2 , something like (5/4). How would i get it to show 1.25?

    This topic has been closed for replies.
    Correct answer Carl Von Stetten

    Change line 9 to:

    <td nowrap="nowrap">(#question_1/question_2#)</td> 

    -Carl V.

    1 reply

    Carl Von Stetten
    Carl Von StettenCorrect answer
    Legend
    May 12, 2014

    Change line 9 to:

    <td nowrap="nowrap">(#question_1/question_2#)</td> 

    -Carl V.