|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
HELP: How to check if Shoe Size exist in db.
Hi, I have a drop down list box that lists all the shoe sizes (5, 5.5, 6, 6.5, 7, etc). I want to know how can I check if the size exist in the database? I know it involves CFIF statements but I don't know how the structure looks like. My db is access. An example would be nice.
Thanks! |
|
#2
|
|||
|
|||
|
Why not just populate the drop down box with a query? Then your query would only be returning sizes that are in the database. Something like:
select distinct size from sizes order by size
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
Quote:
Ok lets say I have 2 records with the same values except they have different size (for example: record 1: Air Jordan 1, $150, 9(size); record 2: Air Jordan 1, $150, 10(size)). I know by using the sql statement you mention above will return 9 and 10. But I want both sizes (9,10) be populated in one drop down list box rather than a separate drop down list. How would I do that? |
|
#4
|
|||
|
|||
|
I'm not sure why you would want to do that. But if you have some other value that "connects" these, like an order id, you should be able to do:
select orderID, size from orders group by orderID And then when you output the select box use <cfoutput group="orderID"> to group the sizes that are from the same orderID together. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > HELP: How to check if Shoe Size exist in db. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|