Solved

ListLast, ListFirst

Posted on 2006-06-19
2
475 Views
Last Modified: 2013-12-24
below (code)  allows me to get both prodId and price out of the form on one value using ListFirst and ListLast, thats fine. but i would like to add another i.e. have this... <option value="#prodId# - #price# - #name#">#name#</option></cfoutput>


-WHAT I HAVE SO FAR THAT GETS TWO
-FORM WITH QUERY-
<cfloop query="searchQuery">
<cfoutput><option value="#prodId# - #price#">#name#</option></cfoutput>
</cfloop>

-GET ALL VALUES-
<cfloop list="#select2List#" index="i">
<cfset prodId = ListFirst(#i#,"-")>
<cfset price = ListLast(#i#,"-")>
<cfloop> etc
0
Comment
Question by:pigmentarts
2 Comments
 
LVL 12

Accepted Solution

by:
mkishline earned 500 total points
ID: 16935696
<cfoutput query="searchQuery">
  <option value="#prodId# - #price# - #name#">#name#</option>
</cfoutput>

<cfloop list="#select2List#" index="i">
  <cfset prodID = ListFirst(i,'-') />
  <cfset price = ListGetAt(i,2,'-') />
  <cfset name = ListLast(i,'-') />
</cfloop>
0
 
LVL 12

Author Comment

by:pigmentarts
ID: 16935777
thank you!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now