that's an easy one!

WHERE     (tblItemColours.FKItemID = GetCartItems.ItemId)

should be

WHERE     (tblItemColours.FKItemID = #GetCartItems.ItemId#)





                                                                                       
                                  
                    "Paul Swingewood"                                                  
                                  
                    <[EMAIL PROTECTED]        To:     [EMAIL PROTECTED]                
                       
                    tmail.com>                 cc:                                     
                                  
                                               Subject:     [ cf-dev ] More nuttiness  
                                  
                    16/07/2004 16:02                                                   
                                  
                    Please respond to                                                  
                                  
                    dev                                                                
                                  
                                                                                       
                                  
                                                                                       
                                  



Since changing the tables I have now developed a few more errors to do with

the queires.

I get this error
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]The column prefix
'GetCartItems' does not match with a table name or alias name used in the
query.


Heres the query

<cfoutput query = "GetCartItems">
                               <CFQUERY  NAME="GetColours" datasource="
#application.dsn#">
                                          SELECT tblItemColours.FKItemID,
                                                    tblColours.Colour,
                                                    tblcolours.colourID
                                          FROM  tblColours
                                          INNER JOIN tblItemColours
                                          ON tblColours.ColourID =
tblItemColours.Id
                                          WHERE
(tblItemColours.FKItemID = GetCartItems.ItemId)
                               </cfquery>

                               <TR>
                                          <TD BGCOLOR="##cc0000">
#PartNum#</TD>
                                          <TD BGCOLOR="##cc0000">
#ItemName#</TD>
                                          <td BGCOLOR="##cc0000">
                                                    <!---
     <cfif GetCartItems.ItemsItemSize eq "">
                          N/A
                    <cfelse>
                      <select name
="selectSize#Replace(ItemIDPK,"-","_","ALL")#">
<cfloop index = "ListElementSize" list = "
#ValueList(GetCartItems.ItemsItemSize)#">
<cfif #ListElementsIZE# eq GetCartItems.CartItemsItemSize> <!--- 
preselect
it --->

      <option value="#ListElementSize#"
selected>#ListElementSize#</option>

<cfelse>

      <option value="#ListElementSize#">#ListElementSize#</option>

</cfif>
                                                              </cfloop>
                                                    </select>
                                                    </cfif>
                                                    --->
                                          </td>
                                          <td BGCOLOR="##cc0000">
                                                    <select name
="selectColour#Replace(ItemIDPK,"-","_","ALL")#">
                                                         <cfloop query
="GetColours">

<cfif GetColours.ColourID eq GetCartItems.ItemColour> <!--- preselect 
it
--->

      <option value="#ListElementColour#" selected>#GetColour#</option>

<cfelse>

      <option value="#GetColour.ColourID#">#GetColour#</option>

</cfif>
                                                              </cfloop>
                                                    </select>
                                          </td>
                                          <td ALIGN="RIGHT" bgcolor="
##cc0000">#lscurrencyFormat(ItemCost)#</TD>
                                          <td bgcolor="##cc0000">
                                                    <input type="Text" name
="Quantity#Replace(ItemIDPK,"-","_","ALL")#"
value="#Quantity#" align="RIGHT" size="3">
                                          </TD>
                                          <TD BGCOLOR="##cc0000" ALIGN
="RIGHT">

#lscurrencyFormat(ItemCost * Quantity)#
                                          </TD>
                               </TR>
                               <!--- Add cost of current item(s) to total
cost --->
                               <CFSET TotalCost = TotalCost +
(GetCartItems.ItemCost *
GetCartItems.Quantity)>
                               <cfset ListElementColour = "">
                     </cfoutput>

I am trying to get the colours to populate the select drop down relative to

the the itemID from the items table.

Regards - Paul



--
These lists are syncronised with the CFDeveloper forum at
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided
by activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by
proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by
gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]






-- 
These lists are syncronised with the CFDeveloper forum at 
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
 
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]

Reply via email to