1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

two criteria search

Discussion in 'Resource center' started by garywww, Sep 7, 2004.

  1. garywww

    garywww Member

    Joined:
    Sep 5, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    11
    hi, Anyone know if I want two criteria including tradename and weight these two criteria to search.
    Then you can see the line syntax of
    " tradename.name like '"& inparam &"' and " & _
    Now, I want to add one more let say
    " tradename.name, weight.name like '"& inparam &"' and " & _
    for the sql syntax. Then I created a single search button called by
    criteria search. Once I input tradename on the by item category and
    I also input the weight on the by weight textbox and press the single
    search button on the bottomneath. What will be the correct snipple code
    The url is : http://internal.quickentextiles.com.hk/sampleroom/byall.asp?searchtype='Alph'



    searchtradenameAZSQL = "select products.name as ProductName, suppliers.name as SupplierName, weight.name as WeightName, color.name as ColorName, twill.name as twillName, " & _
    " tradename.name as TradeName, suppliers.ID as SupplierID " & _
    " from products, tradename, suppliers, weight, color, twill, pointers where " & _
    " tradename.name like '"& inparam &"' and " & _
    " pointers.Productid = products.id and " & _
    " pointers.supplierid = suppliers.id and " & _
    " pointers.weightid = weight.id and " & _
    " pointers.colorid = color.id and " & _
    " pointers.twillid = twill.id and " & _
    " pointers.tradenameid = tradename.id order by weight.name, tradename.name, color.name, twill.name, products.name"


    thanks
    My email is : noemail@ddies.com

    *email addy removed by mod yet again*
     
    Last edited: Sep 7, 2004
  2. Nephilim

    Nephilim Moderator Staff Member

    Joined:
    Feb 13, 2003
    Messages:
    13,161
    Likes Received:
    1
    Trophy Points:
    116
    Last edited: Sep 7, 2004

Share This Page