Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,414
    Thanks
    269
    Thanked 32 Times in 31 Posts

    mysql upper lowercase name

    I am having an issue with the query seeing upper and lower case named files as the same.

    the server is fine it does allow me to add it to the directory either way and it does see it as different filenames.

    but if i have a value in my table for example Widget and widget and i run a query on that, mysql sees both names as the same.

    i have no strtolower or strtoupper in my script.

    any suggestions? i need mysql to see Widget and widget as different values.
    Last edited by durangod; 09-06-2011 at 09:06 PM.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,862
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    but if i have a value in my table for example Widget and widget and i run a query on that, mysql sees both names as the same.
    Code:
    SELECT something from somewhere where BINARY filename='somename'
    Check http://dev.mysql.com/doc/refman/5.0/...binary-op.html
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    durangod (09-06-2011)

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,198
    Thanks
    80
    Thanked 4,453 Times in 4,418 Posts
    FWIW, the ANSI SQL requirement is that text values are *supposed* to be case insensitive. Most DBs provide some way to override the default behavior. MySQL's use of BINARY happens to be one of the simplest.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    durangod (09-06-2011)

  • #4
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,414
    Thanks
    269
    Thanked 32 Times in 31 Posts
    thank you both very much


  •  

    Posting Permissions

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