Results 1 to 5 of 5

Thread: A Query Problem

Hybrid View

  1. #1

    Thread Starter
    Hyperactive Member AvisSoft's Avatar
    Join Date
    Sep 2002
    Location
    Chandigarh
    Posts
    459

    A Query Problem

    hello

    i have 4 fields

    1. category
    2. from_price
    3. to_price
    4. words

    this is basically a search query ...i don't know how to query for range like a user need to search like:

    category : visual basic
    from_price: 10
    to_price: 100
    words: active x controls

    now active x controls should be displayed which are in range from 10 to 100 in the category visual basic. ( i will make the display thing) please help me with query.

    thanks!
    Tapan Bhanot,
    CEO, Avis Software.
    Website: www.avissoftware.com

  2. #2
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Code:
    SELECT * FROM tablexyz WHERE category = 'visual basic' AND range BETWEEN 10 AND 100
    Hopefully you don't have 2 fields in the database. Unless you're actually storing ranges, you should only store the price for the item and use the BETWEEN keyword to search for things in a certain range.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  3. #3

    Thread Starter
    Hyperactive Member AvisSoft's Avatar
    Join Date
    Sep 2002
    Location
    Chandigarh
    Posts
    459
    Hi Ober,

    Thanks for the reply. Yes i am only stroring price. Also you did not mention the keywords in the query how do i search for keywords ?

    Thanks!
    Tapan Bhanot,
    CEO, Avis Software.
    Website: www.avissoftware.com

  4. #4
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Oh, sorry. Forgot that part:
    Code:
    SELECT * FROM tablexyz WHERE category = 'visual basic' AND range BETWEEN 10 AND 100 AND words LIKE '%active x controls%'
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  5. #5

    Thread Starter
    Hyperactive Member AvisSoft's Avatar
    Join Date
    Sep 2002
    Location
    Chandigarh
    Posts
    459

    Re: A Query Problem

    Thanks ober u r gr8 m8!
    Tapan Bhanot,
    CEO, Avis Software.
    Website: www.avissoftware.com

Posting Permissions

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



Click Here to Expand Forum to Full Width