Need to convert all CFquery tags to lowercase

2010-02-26 Thread phil phil
Hello, I do need to migrate from Access to MySQL on a Windows and shared server environment. All existing queries (approx 2000) are failing because they are not lowercased. Does anyone know of a script that would look into every files for the CFquery tag and lowercase its content between? Thi

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread phil phil
Thanks Michael, Ideally I would like to keep the comments in Uppercase but can do without it. > >You can use just about any regex tool to do the job, including writing >a fast tool in CF to do the job. I am not sure how to use it but will play with it. (]+>.+?) >\L\1 ~

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread phil phil
>As far as I know there is no requirement in MySQL for queries to be >lowercase. I just ran one in all uppercase and it worked fine. There >has to be something else causing this problem. > > >> Are you on Linux? It is not the case for Windows with my hosting company which is unable to change s

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread phil phil
It cost me to make the below code to work. Should I use a Rereplace expression? (]+>.+?) \L\1 Thanks in advance for your feedbacks >Do you need all of the query lowercased or is there part that you want >to keep uppercased? If you don't care then this regex will do the job: > >(]+>.+?) >\L\1 >

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread phil phil
It seems that the table name is case sensitive but not the columns. For e.g if I change the name of the table to 'company' from 'Company' then it cannot find the table because in MYSQL it is referred as 'Company'. BTW, we are on Linux which I understand is case sensitive. >If I recall right

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread phil phil
Problem is that in my code over the years the table name can be as 'Company' or 'company' so just changing the table names in mysql to lowercase is not enough but yes a necessary step (can do it from the GUI: PHPadmin) Then as you wrote changing all occurrences of the table names (1500 cfquery

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread phil phil
I tried this but as you can see I am REgex illiterate and more... REReplaceNoCase(TheFile,"(]+>.+?)","(]+>.+?\L\1)","all") It will return the content of the cfquery but I am cannot find a way to lowercase it properly. Thanks >yes. REReplace. >The pattern your trying to match is the first lin