Need a set of variables...
d1_name --> d42_name
They will be defined by Records being exported out of the Database.
<CFQUERY NAME="driver" DATASOURCE="#dsn#">
SELECT *
FROM driver
WHERE member_id = #Session.member_id#
</CFQUERY>
This could return any amount of records... determining the user's policy.
Right now I'm doing this...
<CFLOOP QUERY="driver">
<CFIF driver.CurrentRow eq 1>
<CFSET d1_name = "#name#">
</CFIF>
<CFIF driver.CurrentRow eq 2>
<CFSET d2_name = "#name#">
</CFIF>
<CFIF driver.CurrentRow eq 3>
<CFSET d3_name = "#name#">
</CFIF>
... etc etc
</CFLOOP>
There has to be an easier way for me to do this... These params are then read into a fdf text file for merging with a PDA, and all the variables are currently hard coded... I would just bite the bullet and hardcode all this crap but for this little portion there are 8 variables per record and 42 possible slots... therefor 336 variables... lots of fricken code.. (I'm pushing like 1040 lines for this one little area of a script... not good... and I have to do the same thing again for something else)
Any response is appreciated.
Ryan
d1_name --> d42_name
They will be defined by Records being exported out of the Database.
<CFQUERY NAME="driver" DATASOURCE="#dsn#">
SELECT *
FROM driver
WHERE member_id = #Session.member_id#
</CFQUERY>
This could return any amount of records... determining the user's policy.
Right now I'm doing this...
<CFLOOP QUERY="driver">
<CFIF driver.CurrentRow eq 1>
<CFSET d1_name = "#name#">
</CFIF>
<CFIF driver.CurrentRow eq 2>
<CFSET d2_name = "#name#">
</CFIF>
<CFIF driver.CurrentRow eq 3>
<CFSET d3_name = "#name#">
</CFIF>
... etc etc
</CFLOOP>
There has to be an easier way for me to do this... These params are then read into a fdf text file for merging with a PDA, and all the variables are currently hard coded... I would just bite the bullet and hardcode all this crap but for this little portion there are 8 variables per record and 42 possible slots... therefor 336 variables... lots of fricken code.. (I'm pushing like 1040 lines for this one little area of a script... not good... and I have to do the same thing again for something else)
Any response is appreciated.
Ryan