How about this:

 <cfset dbQuery="12_0,13_1,14_4,34_5"/>
<cfset varArray = arraynew(2) />

<cfset i = 1 />
<cfset j = 1 />

<cfloop index = "element" list = #dbQuery#>
      <cfloop index = "single" list = #element# delimiters="_">
            <cfset varArray[i][j] = "#single#"/>
            <cfset j = j + 1/>
      </cfloop>
      <cfset i = i + 1 />
      <cfset j = 1 />
</cfloop>

 <cfdump var="#varArray#"/>
You can then access the individual elements as array index.


On 8/1/07, Seth Kovanic <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>    I have the following in a field in a DB
>
> 12_0,13_1,14_4,34_5 etc. I want to be able to search that field and store
> for example on the first set of numbers both the 12 and the 0 in two unique
> variables.
>
> I know I need to setup a loop to accomplish this, but I am uncertain how
> to setup a search within the string. I basically need to filter out the two
> numbers and setup them up in two unique variables to then insert them into
> another db.
>
> Any ideas ?
>
> Thanks !
>
> p.s. I may have created a thread similar to this, and if I did I
> apologize.
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2966
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to