How to make a SELECT in PHP/MySQL case insensitive?

前端 未结 7 902
面向向阳花
面向向阳花 2020-12-06 11:55

Her\'s my probleme, i guess its really basic.

I\'m trying to lookup in the database if a line does exist. heres my code :

$req=\"SELECT * FROM INSTIT         


        
7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-06 12:45

    You can use LIKE BINARY in your query..

    Like this:

    SELECT * FROM table_name WHERE column_name LIKE BINARY 'search_string'

    this will check "search_string" data in case sensitive

提交回复
热议问题