Rank and Return Discounted Items

Results 1 to 2 of 2

Thread: Rank and Return Discounted Items

  1. #1
    Ed Croson Guest

    Default Rank and Return Discounted Items

    Here&#039s a sticky one: <BR>I have a script that runs the following query: <BR>SQLQuery="SELECT Product_Id, ItemName, Price FROM product WHERE Product_Id = &#039" &<BR>productname(counter) & "&#039 " <BR>The &#039& productname(counter) &&#039 part is the value from an array of productname, where the user has<BR>chosen one or more items from a multiple select box. It then builds a table in HTML and displays<BR>Product_Id, ItemName, and Price for each item ordered, along with an item count. I then want to<BR>calculate a discount based on "Buy three items, get one FREE!" I want to show which items are to<BR>be free, and return the discounted total to the screen. <BR><BR>I&#039ve been racking my brain about this all week. Can someone PLEASE help me? <BR><BR>Thanks, <BR>Ed Croson

  2. #2
    Join Date
    Dec 1969

    Default RE: Rank and Return Discounted Items

    Not sure if I follow exactly what you are doing, but I would probably pass the array data to a Stored Proc and let the Stored Proc do all the processing, calculating, etc. Have the Stored Proc return the Product_Id, ItemName, Price and a flag that you can substitute with possibly an Image (FREE!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts