Solved

ListLast, ListFirst

Posted on 2006-06-19
2
484 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

914 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

23 Experts available now in Live!

Get 1:1 Help Now