Solved

ListLast, ListFirst

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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
URL redirect 4 67
Grub Broken on Ubuntu 16.04 LTS, Mate 1.14 GUI 5 245
wordpress limitations 4 124
New OSQA server has a ton of fake users 4 71
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

821 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