Results 1 to 3 of 3

Thread: if statement query

  1. #1
    Join Date
    Aug 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default if statement query

    i have one for you. trying to establish whether this is possible. we all know we can use "==" and "!=" in an if statment to determine "equal to" and "definitely not equal to."

    is there something we can use that is similar to "LIKE '%whatever%'" in mysql?

    i need to use an if statement to determine a list of specific products from a large database. unfortunately the only identifier is in a string with a variable. i can't be bothered to sort out a regex either. lol

    cheers

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Er... strpos()? strstr()?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Aug 2007
    Location
    Ohio
    Posts
    79
    Thanks
    0
    Thanked 15 Times in 15 Posts

    Default

    We need more information. If you're searching a database, why can't you use MySQL's LIKE? Anyways, there are many ways of analyzing strings and there's no way for any of us to tell what you need in your situation without more information.

Bookmarks

Posting Permissions

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