I currently have a code that generates mysql tables automatically, where the name of the table is generated by user-input. Those names and other table-related-stuff are stored in a separated table, thus allowing me to know how many tables there are and their names.
Now, everything works fine, unless someone gives the script a name with a capital letter. Now i know MySQL stores the name in all-lower-case words so if i try to acces that table (eg. User-Table, which mysql generated as "user-table"), with the name stored in my other table, i get the classic error message: You have an error in your SQL syntax near ''User-Table'' at line 1.
so, can anyone help me?
I know about the str_replace() , but frankly i haven't got a clue how to use it for this specific problem.
thanks in advance
rulox