![]() |
MySql LIKE - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: MySql LIKE (/showthread.php?tid=64390) Pages:
1
2
|
RE: MySql LIKE - skunkbad - 02-17-2016 Why wouldn't you just choose a different escape character, and what's wrong with the default backslash? Do you really allow usernames to have a backslash as a valid character? RE: MySql LIKE - glennm - 02-17-2016 (02-17-2016, 03:51 PM)skunkbad Wrote: Why wouldn't you just choose a different escape character, and what's wrong with the default backslash? Do you really allow usernames to have a backslash as a valid character? Because I use CI their query builder and they use '!' by default, nothing much I can do about it. And that won't help me either, like I said I can't controll what characters are aloud and the source I am getting all the info from accepts all characters (even foreign language characters, was a pain in the ass to be able to receive and save them correctly in the database). RE: MySql LIKE - skunkbad - 02-17-2016 (02-17-2016, 05:53 PM)glennm Wrote:(02-17-2016, 03:51 PM)skunkbad Wrote: Why wouldn't you just choose a different escape character, and what's wrong with the default backslash? Do you really allow usernames to have a backslash as a valid character? I know in general you and I should never touch system files, but there is a time where hacks are necessary. I've only once had to do this, and it was also for the db. They just don't make db easy to extend. RE: MySql LIKE - Narf - 02-18-2016 (02-17-2016, 09:00 PM)skunkbad Wrote:(02-17-2016, 05:53 PM)glennm Wrote:(02-17-2016, 03:51 PM)skunkbad Wrote: Why wouldn't you just choose a different escape character, and what's wrong with the default backslash? Do you really allow usernames to have a backslash as a valid character? The character is changeable without modifying system/, but I highly doubt that just changing the escape character would help. RE: MySql LIKE - glennm - 02-18-2016 (02-18-2016, 02:48 AM)Narf Wrote:(02-17-2016, 09:00 PM)skunkbad Wrote:(02-17-2016, 05:53 PM)glennm Wrote:(02-17-2016, 03:51 PM)skunkbad Wrote: Why wouldn't you just choose a different escape character, and what's wrong with the default backslash? Do you really allow usernames to have a backslash as a valid character? Indeed Narf, changing the escape character won't help. I might have figured out some kind of way so that it would still work for me, not a solution to this problem. I will have 2 buttons: -1 searching for usernames containing the string with LIKE -the other will search for the exact name using WHERE Name = This way users should always be able to find the username they are looking for. |