Ask a Question related to Coldfusion Database Access, Design and Development.
-
schaudry #1
Checking to see if an item is in shopping cart
Hi all, I'm trying to query a table to see if an item has already been added.
If it hasn't, then add the item to the table and display all the items in the
table. If it is already in the table, then just display all the items in the
table. This is what I have so far, but it only checks the first item in the
table, not all of them. Any ideas? <cfquery name='checkSemCart'
datasource='seminar'> SELECT * FROM SemCartT WHERE ClientID =
#session.ClientID# </cfquery> <cfif #checkSemCart.ActID# EQ '#url.ActID#'>
<cfquery name='getSemCart' datasource='seminar'> SELECT DISTINCT s.*, a.*
FROM SemCartT s, ActivityListingT a WHERE s.ClientID = #session.ClientID#
AND s.ActID = a.ActID </cfquery> <cfquery name='totalPrice'
datasource='seminar'> SELECT SUM(ActCost) AS TotalPrice FROM 'SemCartT and
ActivityListingT' WHERE ClientID = #session.ClientID# </cfquery> <cfelse>
<cfquery name='addSeminar' datasource='seminar'> INSERT INTO
SemCartT(ClientID,ActID) values('#session.ClientID#','#url.ActID#')
</cfquery> <cfquery name='getSemCart' datasource='seminar'> SELECT DISTINCT
s.*, a.* FROM SemCartT s, ActivityListingT a WHERE s.ClientID =
#session.ClientID# AND s.ActID = a.ActID </cfquery> <cfquery
name='totalPrice' datasource='seminar'> SELECT SUM(ActCost) AS TotalPrice
FROM 'SemCartT and ActivityListingT' WHERE ClientID = #session.ClientID#
</cfquery> </cfif>
schaudry Guest
-
Shopping Cart Help!
Hi there. I'm a total newbie developing a small biz commerce website and have no idea how to configure a cheap, quick and easy shopping cart - does... -
shopping cart
Hi i would like to know. In CD-rom , it's possible to make a shopping cart I'm working on a site that requiers a shopping cart (just to calculate... -
Shopping Cart P&P
Why not: For each database inventory item include a nullable 'shipping_cost_factor.' If not set, it defaults to a well known value. This allows... -
shopping cart shopping
Im looking to buy some ecommerce software to hook up to an HTML site. The company will have around 350 products or so to start out, and will be... -
JS shopping cart
peterct07@yahoo.com (Peter Cartwright) wrote in message news:<b6141bd7.0307171525.1c322082@posting.google.com>... Oops wrong forum



Reply With Quote

