why Codeigniter database query is case-insensitive? |
Hi guys,
I want database query to be case sensitive. I have set the table Collation to be "utf8_bin", which is supposed to be case sensitive. However, when I ran the following query code: $this->db->where('code', $code); $this->db->select('*'); $query=$this->db->get('my_table'); return $query->row(); I found that the query was not case-sensitive. For example, my_table has a row where code="abc" but no row with code="Abc". However, if I use $code="Abc" and do the query, which is expected to return null, but it actually returns the row where code="abc". So, any ideas how I can make the query case-sensitive? BTW, I am using Codeignitr 3.X Thank you! |
Messages In This Thread |
why Codeigniter database query is case-insensitive? - by squashking - 04-13-2019, 06:07 AM
RE: why Codeigniter database query is case-insensitive? - by muuucho - 04-13-2019, 07:31 AM
RE: why Codeigniter database query is case-insensitive? - by dave friend - 04-13-2019, 08:33 AM
RE: why Codeigniter database query is case-insensitive? - by squashking - 04-13-2019, 06:12 PM
|