search with AND boolean operator

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Phaelle
    New Member
    • Jun 2007
    • 10

    search with AND boolean operator

    Hi!
    I am doing a search engine and I would like to make a search with the operator AND possible but I can´t find out how. Do I have to explode the phrase entered after each and" or does it exist an easier way to do that?
    Thanks for your help
    Raphaelle
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    Originally posted by Phaelle
    Hi!
    I am doing a search engine and I would like to make a search with the operator AND possible but I can´t find out how. Do I have to explode the phrase entered after each and" or does it exist an easier way to do that?
    Thanks for your help
    Raphaelle
    You are on the right track Raphaelle. You will need to perform a level of parsing on the data you receive from the user. Am I correct in assuming you are using MySQL, or are you doing a search on something else?

    Comment

    • shoonya
      New Member
      • May 2007
      • 160

      #3
      nope dude
      you have to explode it
      eg
      [code=sql]developer = abc and priority = high[/code] is the query
      [code=sql]select ** from *** where developer = abc INTERSECT select ** from **** where priority = high[/code]
      Last edited by pbmods; Jun 14 '07, 07:07 PM. Reason: Changed code language. Thanks for using CODE tags!

      Comment

      • pbmods
        Recognized Expert Expert
        • Apr 2007
        • 5821

        #4
        MySQL also supports boolean operators in fulltext searches.

        Comment

        • ak1dnar
          Recognized Expert Top Contributor
          • Jan 2007
          • 1584

          #5
          Originally posted by Phaelle
          Hi!
          I am doing a search engine and I would like to make a search with the operator AND possible but I can´t find out how. Do I have to explode the phrase entered after each and" or does it exist an easier way to do that?
          Thanks for your help
          Raphaelle
          Have you solved this problem yet? could you please provide more details that describe how your user inputs looks like for the search criteria.
          I think you are using a textbox input isn't it?.

          Comment

          Working...