ColdFusion - 使用查询输出为每行存储变量以重新查询以进行编辑

ColdFusion - Using the Query Output to Store Variables For Each Row to Re-Query for Edit

我绝对是 CFML 的菜鸟,一段时间以来我一直在努力解决这个问题。我使用我创建的详细信息按钮让我的查询输出我的数据,该按钮将进入一个新页面以编辑信息。每个#INV# 都会有更多与之关联的行项目以供审核。我的目标是单击按钮和 运行 基于给定行的 INV 的查询 return 在新页面中需要某种批准的所有关联行项目的输出。然后给我编辑数据的能力。

我想我需要能够将 INV 列存储为我的代码中的一个变量,但不确定如何实现。

如果不是太清楚请见谅!

<cfquery name="Review" datasource="FINANCE_EQMT_ACCT"> 
    SELECT '1' as ROW, ''ABC CO.' AS OWNER, 'T1234567' AS INV, '50.00' AS TOTAL FROM TBL_TEST

</cfquery> 
<div class="container col-xs-12 col-sm-12 col-md-5 col-md-push-1 col-lg-5 col-lg-push-1">   
  <div class="row">
    <table class="table table-striped">
      <legend>QUEUE</legend>
      <thead>
        <tr>
          <th class="text-center">#</th>
          <th>Owner</th>
                <th>Invoice</th>
          <th>Amount</th>
          <th></th>
            </tr>
      </thead>        
        <tbody>
         <cfoutput query="Review"> 
            <tr>
              <td class="text-center">#ROW#</td>
              <td>#OWNER#</td>
                    <td>#INV#</td>
              <td>#TOTAL#</td>
              <td class="text-right"><form action="review_action.cfm" method="post"><input class="btn btn-primary" type="submit" value="Detail"></form></td>
                </tr>
        </cfoutput>
        </tbody>
    </table>
  </div>
</div>

您不需要保存它。你只需要把它推到下一页

...
<td class="text-right">
  <form action="review_action.cfm" method="post">
     <input type="hidden" name="INV" value="#INV#" />
     <input class="btn btn-primary" type="submit" value="Detail">
  </form>
</td>
...

review_action.cfm 然后将该值作为 form.inv

的一部分进行处理