CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004
    Location
    Holy Land
    Posts
    306

    Database Searching...?

    Ok, I know that this is very similiar to the previous question... but i don;t think it is the same question... or i just didn't understand the previous question...

    Anyway.. It goes like this...
    I have a database with lots of items and there is a column called "Descrip" - which holds the description of the item...
    I want the user to be able to search for a certain word, and get the rows of every item with that word in the description...

    How do i go about doing this?

    10X, gilly914

  2. #2
    Join Date
    Dec 2000
    Location
    Dallas, Texas
    Posts
    62

    Post Re: Database Searching...?

    Quote Originally Posted by gilly914
    Ok, I know that this is very similiar to the previous question... but i don;t think it is the same question... or i just didn't understand the previous question...

    Anyway.. It goes like this...
    I have a database with lots of items and there is a column called "Descrip" - which holds the description of the item...
    I want the user to be able to search for a certain word, and get the rows of every item with that word in the description...

    How do i go about doing this?

    10X, gilly914
    If the user chooses to search for a records that have the work XYZ in the Descrip field, this would be your query:
    SELECT * FROM table WHERE table.Descrip LIKE '%XYZ%'

    This works in SQL Server/MSDE. For MS Access, replace the '%' with '*'.
    It compiles in Oracle (with either '%' or '*'), but I not sure which one will
    give the correct results.

  3. #3
    Join Date
    Jul 2004
    Location
    Holy Land
    Posts
    306

    Re: Database Searching...?

    But how do i do this with MySQL???
    the same?

    ill try...

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

Featured