Unusual Problem

Results 1 to 2 of 2

Thread: Unusual Problem

  1. #1
    Join Date
    Dec 1969

    Default Unusual Problem

    Hi all<BR><BR>I am currently designing an E-Commerce site, in Ultradev, for a client who prices<BR>their products in either Sterling, Euros or Dollars<BR><BR>They do not want a simple conversion system as this would not work<BR>with their pricing structure. They want to set up the ssytem so<BR>clients who login are recognised and their currency used is held in<BR>the db.<BR><BR>So for so good - I have set up the query to use the result from the<BR>client section to search the revelant field in the db for the prices,<BR>each having its own field. Now comes the problem<BR><BR>As I dont know which field is being used for this, I cannot display<BR>the information on a page. The usual method will not work as the<BR>field name will be different in Each Case. I have pasted the<BR>recordset code below so if anyone can suggest a way of retrieving the<BR>corrct info for displaying it would be much appreciated<BR><BR>&#060;%<BR>Dim Recordset1__MMPriceParam<BR>Recordset1__MMPricePar am = "fldpricesterling"<BR>if (Session("currency") &#060;&#062; "") then Recordset1__MMPriceParam =<BR>Session("currency")<BR>%&#062;<BR>&#060;%<BR> set Recordset1 = Server.CreateObject("ADODB.Recordset")<BR>Recordse t1.ActiveConnection = MM_post_STRING<BR>Recordset1.Source = "SELECT ID, fldcategory, fldsubcat, fldstockcode,<BR>flddescription, &#039;" + Replace(Recordset1__MMPriceParam, "&#039;", "&#039;&#039;") + "&#039;<BR> FROM tblproducts WHERE fldcategory = &#039;" +<BR>Replace(Recordset1__MMColParam, "&#039;", "&#039;&#039;") + "&#039; ORDER BY " +<BR>Replace(Recordset1__MMSortParam, "&#039;", "&#039;&#039;") + " ASC"<BR>Recordset1.CursorType = 0<BR>Recordset1.CursorLocation = 2<BR>Recordset1.LockType = 3<BR>Recordset1.Open()<BR>Recordset1_numRows = 0<BR>%&#062;<BR><BR>You can email suggestions to shane@systima-technology.co.uk<BR><BR>Cheers.

  2. #2
    Join Date
    Dec 1969

    Default RE: Unusual Problem

    I would have designed the table differently, not with separate fields for each currency but using one price column and one for currency types. <BR><BR>i.e.<BR><BR>pid cid price<BR>-------------<BR>111 £ 11111<BR>111 $ 22222<BR>111 € 33333

Posting Permissions

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