SQL Statements in a Database Search

Discussion in 'ASP General' started by Bill, Jul 15, 2003.

  1. Bill

    Bill Guest

    I can't believe I can't find this answer on Google... I'm trying to build a
    database search query. User enters a search term into a box, and so I'd like
    to use that string to search a column in a database.

    So, something like

    SELECT "column_name"
    FROM "table_name"
    ?SQLcommand? (parm1 and parm2 and "phrase phrase2")

    So, if the site visitor entered
    parm1 and parm2 and "phrase phrase2"

    in the search box, what is the proper ?SQLcommand? to get this to be a good
    search engine for my database?

    ba
     
    Bill, Jul 15, 2003
    #1
    1. Advertising

  2. Bill

    Bill Guest

    Can YourInput equal something like
    dog AND cat OR "bird house" ?




    "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    news:...
    > huh?
    > You mean:
    > "Select * from tablname where field1 like '%" & YourInput & "%'"
    >
    >
    >
    > --
    > ----------------------------------------------------------
    > Curt Christianson (Software_AT_Darkfalz.Com)
    > Owner/Lead Designer, DF-Software
    > http://www.Darkfalz.com
    > ---------------------------------------------------------
    > ..Offering free scripts & code snippits for everyone...
    > ---------------------------------------------------------
    >
    > "Bill" <> wrote in message
    > news:...
    > > I can't believe I can't find this answer on Google... I'm trying to

    build
    > a
    > > database search query. User enters a search term into a box, and so I'd

    > like
    > > to use that string to search a column in a database.
    > >
    > > So, something like
    > >
    > > SELECT "column_name"
    > > FROM "table_name"
    > > ?SQLcommand? (parm1 and parm2 and "phrase phrase2")
    > >
    > > So, if the site visitor entered
    > > parm1 and parm2 and "phrase phrase2"
    > >
    > > in the search box, what is the proper ?SQLcommand? to get this to be a

    > good
    > > search engine for my database?
    > >
    > > ba
    > >
    > >

    >
    >
     
    Bill, Jul 15, 2003
    #2
    1. Advertising

  3. Bill

    Bob Barrows Guest

    Bill wrote:
    > I can't believe I can't find this answer on Google... I'm trying to
    > build a database search query. User enters a search term into a box,
    > and so I'd like to use that string to search a column in a database.
    >
    > So, something like
    >
    > SELECT "column_name"
    > FROM "table_name"
    > ?SQLcommand? (parm1 and parm2 and "phrase phrase2")
    >
    > So, if the site visitor entered
    > parm1 and parm2 and "phrase phrase2"
    >
    > in the search box, what is the proper ?SQLcommand? to get this to be
    > a good search engine for my database?
    >
    > ba


    You need to further define your requirements. When asking for query help,
    always provide your table structure, some sample data, and the results you
    wish your query to return given the sample data and parameters provided.

    Bob Barrows
     
    Bob Barrows, Jul 15, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neil Zanella
    Replies:
    8
    Views:
    1,233
    mfmehdi
    Oct 20, 2006
  2. Harry George
    Replies:
    6
    Views:
    444
    Bart Nessux
    Feb 23, 2004
  3. Vince
    Replies:
    12
    Views:
    776
    Martin Gregorie
    Jan 21, 2008
  4. John Crichton
    Replies:
    6
    Views:
    290
    John Crichton
    Jul 12, 2010
  5. Îίκος Αλεξόπουλος

    Database statements via python but database left intact

    Îίκος Αλεξόπουλος, Oct 5, 2013, in forum: Python
    Replies:
    17
    Views:
    206
    Piet van Oostrum
    Oct 6, 2013
Loading...

Share This Page