Quote:
Originally Posted by mukeshrasm
I am using PhpMyAdmin to run the SQL. And there is no double quote in the sql but why it is giving such error that I don't know. So if you can help me and try to run this query on your own and find whether it is working or not. Ok
My query is running fine. I just copied it again from this forum and run it, just to verify there was no mistyping by accident.
I don't know about PhpAdmin, maybe it's PhpAdmin that is doing something weird with the query when sending it to mySql, like special character replacement.
I am using SQLYog. It's free. And it supports triggers. Give this program a try and see if it runs the trigger-SQL without error. I was also creating triggers with Java using JDBC and it was running fine. So if you have still problems even after using SQLYog, which supports you in a way that it writes a full trigger template for you automatically after you click a button on a table, then there is something wrong with your mySql database.
Are you sure that you are accessing the correct mySql instance? In the beginning I installed mySql 4.2 (which cannot handle triggers) and then I installed mySql 5.0.41 (which can handle triggers), but the mySql 4.2 instance was still running and I was accessing it in one of my programs unintentional, so triggers did not run, and no data seemed to be updated by normal queries. Only after I deinstalled the 4.2 instance manually, my program was automatically connecting to mySql 5.0.41 instance and then the trigger creation worked.