Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ListLast, ListFirst

Posted on 2006-06-19
2
Medium Priority
?
525 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 2000 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Screencast - Getting to Know the Pipeline
Suggested Courses

971 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