iTheExpert
BANNED
- Oct 25, 2013
- 116
- 38
Is there a work around case sensitive table name references in mysql?
I am SQL server developer and some things giving me hard time in mysql. I understand where its comming from but just wondering if there some kind of work around.
I am just trying to make sure nobody can break my php code since I am newbie to php.
So let's say I am passing parameters in the URL and directly executing SQL queries from what's passed to me in the URL.
So in the php code I am taking user name and I do something like that escape(toupper(get['usrname']));
On the first "escape" function, it takes single quotes (if any) and puts // character on the front. Next, it converts parameter value to upper case, which prevents anybody from passing table name, because my table name is lower case in the database.
Just wondering if there any work around, where table name can be passed and executed in that instance?
I am SQL server developer and some things giving me hard time in mysql. I understand where its comming from but just wondering if there some kind of work around.
I am just trying to make sure nobody can break my php code since I am newbie to php.
So let's say I am passing parameters in the URL and directly executing SQL queries from what's passed to me in the URL.
So in the php code I am taking user name and I do something like that escape(toupper(get['usrname']));
On the first "escape" function, it takes single quotes (if any) and puts // character on the front. Next, it converts parameter value to upper case, which prevents anybody from passing table name, because my table name is lower case in the database.
Just wondering if there any work around, where table name can be passed and executed in that instance?