Case sensitive query
Case sensitive query

I am dealing with an existing database and an existing login system that I can not modify.
So, I need to have a query to an Oracle table that would be case insensitive.
Is there a way to have a aoData.push that is not case sensitive?
Or am I looking in the wrong direction when I am trying to use aoData.push?
This discussion has been closed.
Answers
aoData.push
? That's internal in DataTables - I'm not clear why you would need to modify that.Can you show me a bit more of your code / query / data please?
Allan
Sure.
This is where the dataTable is created:
the problem is that the criteria for selecting data is user_id, in aoData.push, based in the username, who is at this point logged it. See line 7.
At some point, time ago, the system was created in a way that allowed users to have user names with uppercase and lowercase.
Forward three years later and now, for some other reasons there is a business decision to not enforcing the upper-lower case login rules any longer. So, now there are users who have a user name = Allan and logged in with username=allan and obviously they cannot see their data.
so I would like to have a aoData.push where user_id does not care if is Allan, or allan.
I know, and I understand that this is a business decision that does not make a lot of sense from my perspective.
Oh I see! You are using the old fnServerParams (
ajax.data
is the "modern" way of doing it).Heh - got a new CTO who's user name was already in use? ;-).
From DataTables point of view, I think what you are doing is fine. It would really be up to the server-side script to handle the case insensitivity. You are giving it a value of
user_id
(which I presume is coming from a global variable set based on the session). All DataTables can do is pass that through to the server. The server is then querying the database (presumably) and any case sensitivity would be handled there.Allan
My server side script goes like this:
I still fail to see where I can handle the user_id = Allan = allan
I just have $_REQUEST['user_id'].
Any pointers?
should do it.
Allan