Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Nov 2002
    Location
    Elmira, NY
    Posts
    41
    Member #
    261
    Does anyone have any tips on searching a mysql database.

    I need to search a field called items which is a text and contains items like this

    item1, item2, item3 and so on

    I need to search that field for item1 or item2 or something specific like that.

    also items maybe capitilized or not how can i make it so if i search for item1 it is the same whether tis Item1 or item1

  2.  

  3. #2
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    You can specify through LIKE %xxxx%, or you can build a 'full text' column, which would allow for more sophisticated searches and returns.
    S. Rosland

  4. #3
    Member
    Join Date
    Nov 2002
    Location
    Elmira, NY
    Posts
    41
    Member #
    261
    Quote Originally Posted by rosland
    You can specify through LIKE %xxxx%, or you can build a 'full text' column, which would allow for more sophisticated searches and returns.
    do i need the % before and after the search query in the call to the database?

  5. #4
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    The % mean `anything can be before' and `anything can be after', i.e., the field doesn't have to contain EXACTLY that text, but rather it has to contain that text amongst other things.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:19 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com