Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use ONE select statement to populate multiple fields

Status
Not open for further replies.

PDL

IS-IT--Management
Dec 11, 2000
36
0
0
US
I have a database with 4000 names in it... want to generate the select statement, select a name, and select a radio button defining which field to populate... Trying to avoid having 10 SELECTES with 4000 names each to populate 10 name fields? Any ideas?
 
Don't understand what you mean by "select a radio button defining which field to populate". If the issue is that you want to use the result set from a DB query multiple times on a single page, that's no problem. You can have multiple
Code:
<cfoutput query=&quot;foo&quot;>
statements, even if the query name is the same, as long as they don't overlap. CF will simply loop over the result set once for each
Code:
<cfoutput>
tag set.

If this isn't what you are trying to do, maybe some more detailed information on what you need to do is in order. Keep in mind that SELECT and FIELD are ambiguous terms when you're talking about both HTML and SQL.
 
I understand the ability to do multiple CFOUT's... My issue is I do have a page that has 16 INPUT fields which I need to populate with names from a 4000 record table. I didn't want to spend the bandwidth to send 16x4000 or 64,000 names needed to have multuple select boxes.

I was looking for a way to have a single drop down box with an ability to POINT the selection to one of the 16 INPUT boxes on that page..... then I only send the 4000 names once!



 
What I would suggest is next to each input, put a search button that would pop up a window and let the user search on a users name, or let them enter the first few letters to limit the result set. 4000 names in a select list would be extremely long and that would take a long time to load, regardless of how fast the data is retrieved.

HTH,
Tim P.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top