[Mydatabasepilot-cvs] MyDatabasePilot/dbProcessBody ShowRecords.cfm,1.2,1.3
Status: Alpha
Brought to you by:
nanoface
From: <nan...@us...> - 2003-04-18 04:17:14
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv24839 Modified Files: ShowRecords.cfm Log Message: Functionality Added: [ 723484 ] List Selected Data in ShowRecords dbProcess Body Index: ShowRecords.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/ShowRecords.cfm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ShowRecords.cfm 14 Apr 2003 02:34:27 -0000 1.2 --- ShowRecords.cfm 18 Apr 2003 04:17:11 -0000 1.3 *************** *** 6,14 **** * -url.table (table name) must have been passed from calling template * ********************************************************************************************---> ! ! <!---||| Show Records in Current Table |||---> ! <!--- Show table name ---> Table Name:<cfoutput>#url.table#</cfoutput> <table width="100%" border="1" cellspacing="0" cellpadding="2"> <tr> <!--- Create List of Field Names ---> --- 6,17 ---- * -url.table (table name) must have been passed from calling template * ********************************************************************************************---> ! <!-------------------------------------> ! <!--- Show Records in Current Table ---> ! <!-------------------------------------> ! <!---||| Show table name |||---> Table Name:<cfoutput>#url.table#</cfoutput> + <table width="100%" border="1" cellspacing="0" cellpadding="2"> + <!---||| Create Header |||---> <tr> <!--- Create List of Field Names ---> *************** *** 16,18 **** --- 19,39 ---- <cfoutput query="fieldList"><td>#FIELD#</td></cfoutput> </tr> + + <!---||| List Selected Data by Looping through each record and field |||---> + <!--- Loop through records using Index Loop so we can reference the recordnumber in a dynamic variable ---> + <cfloop from="1" to="#selectedData.RecordCount#" index="i"> + <tr> + <td valign="top">Update/Delete Record</td> + <!--- Loop through fields ---> + <cfloop query="fieldList"> + <!--- Output the value of a dynamically created variable which references the current field of the current record ---> + <!--- Use the Evaluate function to get the value of the Dynamic Variable ---> + <!--- The Dynamic variable is queryName.columName[recordNumber] ---> + <!--- Where queryName is "selectedData" ---> + <!--- columName is the value of fieldList.FIELD ---> + <!--- recordNumber is "i" ---> + <td valign="top"><cfoutput>#Evaluate("selectedData." & fieldList.FIELD & "[i]")#</cfoutput></td> + </cfloop> + </tr> + </cfloop> </table> |