Jump to content

Recommended Posts

I have read a few replies to similar questions on this forum, and I only got more confused ...

 

My query looks like this:

 

"SELECT * FROM notes WHERE country = '$country' AND pick = '$pick' AND year = '$year'"

 

I need the pick='$pick' to be case sensitive.  I have lots of instances where I have data like '1a' and '1A' but they are not the same.    In the database, 'pick' is a varchar data type, and the '$pick' php variable is a string.  Is there an easy way to do this?  There's got to be ...

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/185023-case-sensitive-select-statement/
Share on other sites

Thanks for your reply PFMaBiSmAd.  I actually figured out an easier way:  I went into phpMyAdmin and changed the collaction of the 'pick' column from latin_swedish_ci to utf_bin.  I think that forces all SELECT queries to handle the data from the column as binary data.  Anyways, it worked, but I do thank you for your reply!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.