Advertisement

05.20.2004 at 05:24AM PDT, ID: 20996059
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

coldfusion code checking...just need verification if it works

Asked by xuboy in ColdFusion Application Server, ColdFusion Studio

Tags: , ,

Hi, i have a coldfusion code required for my personal project, but i need someone to check it if it works. my coldfusion server wont work, so here is what i have done, can someone please take a look and tell me if it doesnt work...thanks.
This is the first webpage (index.cfm) ..it takes several inputs and searches for them..

<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FDF6E6" text="#000000">
<p class="Third">Search for instruments by supplying the following details.</p>
<form action="action.cfm" method="post" name="form">
<cfquery name="getStuff" datasource="MusicDB">
 SELECT
   Types.TypeName,
   Types.TypeID  
 FROM Types
 </cfquery>
 
<table width="600" height="160">
<tr>
      <td height="40" width="300"> Instrument Type:</td>
      <td width="300" height="40" bgcolor="#FDF6E6">
        <select name="TypeName">
            <option value="Any" selected>Any</option>
            <cfoutput query="getStuff">          
           <option value="#TypeName#">#TypeName#</option>
          </cfoutput>
        </select>
      </td>
</tr>
<tr>
      
      <td height="40" width="300"> Condition:</td>
      <td width="300" height="40" bgcolor="#FDF6E6">
      <p><input type="radio" name="Condition" value="New">
  New</p>
      <p><input type="radio" name="Condition" value="Used">
  Used</p>
        </td>
</tr>
<tr>
      <td height="40" width="300"> Lowest price: $</td>
      <td width="300" height="40" bgcolor="#FDF6E6">        
        <p><input type="text" name="LowestPrice">
      </p></td>
</tr>
<tr>
<td height="40" width="300"> Highest price: $</td>
      <td width="300" height="40" bgcolor="#FDF6E6">        
        <p><input type="text" name="HighestPrice">
      </p></td>
</tr>
</table>
<p>
  <input type="submit" name="SubmitQuery" value="SubmitQuery">
  <input type="reset" name="Reset" value="Reset"></p>
</form></html>
....this webpage first calls the MusicDB which has 2 tables (Instruments and Types)....this webpage calls action.cfm which looks like this:

<html>
<head>

</head>

<body bgcolor="#ffff99" text="#FF6600">

<cfif isNumeric (form.LowestPrice) is "Yes" and (form.LowestPrice less than 0)>

<cfelseif isNumeric (form.LowestPrice) is "Yes" and (form.HighestPrice less than 0)>

<cfelseif isNumeric (form.LowestPrice) is "Yes" and isNumeric (form.HighestPrice) is "Yes" and (form.LowestPrice greater than form.HighestPrice)>

<cfelse>

<cfquery name="getThings" datasource="MusicDB">
 SELECT
   Instruments.InstrumentID,
   Instruments.InstrumentName,
   Types.TypeName,
   Instruments.Condition,
   Instruments.InstrumentPrice  
 FROM Instruments, Types
   
 WHERE (Instruments.TypeID=Types.TypeID)
   
<cfif "#form.TypeName#" is not "Any">
 AND (Types.TypeName="#form.TypeName#")
</cfif>
   
<cfif isDefined (form.Condition) is "Yes">
AND (Instruments.Condition="#form.Condition#")
</cfif>

<cfif isNumeric (form.LowestPrice) is "Yes">
AND (Instruments.InstrumentPrice >= #form.LowestPrice#)
</cfif>

<cfif isNumeric (form.HighestPrice) is "Yes">
AND (Instruments.InstrumentPrice <= #form.HighestPrice#)
</cfif>
 
</cfquery>
<h3><u>Search results are presented below.</u></h3><br><br>
<cfif getThings.recordCount is "0">
 <p>Sorry, No record match your search criteria.<br>
    Please search again.<br>
<cfelse>

 <table width="600">

  <tr>
   <td height="40" width="150">Instrument ID</td>
   <td height="40" width="150">Instrument Name</td>
   <td height="40" width="100">Type</td>
   <td height="40" width="100">Condition</td>
   <td height="40" width="100">Price</td>
  </tr>
 
  <cfoutput query="getThings">
   <tr align="left">
    <td height="40" width="150">#InstrumentID#</td>
    <td height="40" width="150">#InstrumentName#</td>
    <td height="40" width="100">#TypeName#</td>
    <td height="40" width="100">#Condition#</td>
    <td height="40" width="100">#dollarFormat(InstrumentPrice)#</td>
   </tr>
  </cfoutput>

 </table>

</cfif>

</body>
</html>


now assuming all the connections to the database are working as well as the CSS scripts (if any), are there any errors anyone can see? thanks...your contribution is greatly appriciated
-Bob
Start Free Trial
 
Loading Advertisement...
 
[+][-]05.20.2004 at 07:53AM PDT, ID: 11117826

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.20.2004 at 02:04PM PDT, ID: 11121679

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.22.2004 at 01:26AM PDT, ID: 11132303

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: ColdFusion Application Server, ColdFusion Studio
Tags: code, searching, verification
Sign Up Now!
Solution Provided By: Mytix
Participating Experts: 3
Solution Grade: C
 
 
 
Loading Advertisement...
20081112-EE-VQP-43