complex sort: best way???

Results 1 to 2 of 2

Thread: complex sort: best way???

  1. #1
    Join Date
    Dec 1969

    Default complex sort: best way???

    Hello,<BR><BR>I&#039;m trying to work out the best methodology for the following. I have three tables: products, customers, birthday. I run an asp page that checks all the dates in the birthday table, and selects all the records that have a birthday in two weeks time (the fields include age, gender, price, brand, pid) and using a JOIN gets the email address of the "parent" of the record i.e. Jim is registered (id=10), and he has three children in his birthday list, so there are three records with a pid=10<BR><BR>Using this recordset (using getrows and stored in an array) I am trying to decide best how to query the products table to select the products that meet the combined descriptions of each child by parent. So for Jim, he may have record one brand=NIKE, record two brand=ADIDAS etc, price1= £10, price2=£30 etc.<BR><BR>I&#039;ve used a query builder to build a big SQL statement (as below) but I&#039;m not sure how to eliminate the duplicates e.g. record 1 brand=NIKE and record 3 brand=NIKE.<BR><BR>The 2d array is ordered by id and contains all the information. I am thinking of processing the array contents while id = last id, query the database, make a prouct list and then email it to the registered user.<BR><BR>Has anyone got any suggestions on how best to do this?<BR><BR>Thanks,<BR><BR>Mark

  2. #2
    Join Date
    Dec 1969

    Default RE: complex sort: best way???

    can you make it short..<BR> what tables you use and what result do you want..

Posting Permissions

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