I ran into an odd issue on a project I updated awhile ago. I updated an existing sql statement to include IFNULL for an exclusion check. It worked fine on my dev machine, but caused an issue on the production machine.
The version of MySQL on my dev machine was a little bit newer than production so the issue never came up. Here is the error the sql server returned:
#1305 - FUNCTION [DATABASE_NAME].ifnull does not exist
Here is a little bit of the sql that caused the error:
AND IFNULL ( `tbl_category_admin`.`admin_key_id` =5, true )
The problem was caused by the space between IFNULL and (. Changing it to IFNULL( solved the problem. If you run into an issue where MySQL returns an error saying a given function does not exist look for spaces between the function and the "(".
6 comments:
That just happened to me. Thanks to you and Google, I was able to fix it in 5 minutes...
Jan
Just encountered this exact same issue. Thanks for sharing.
Thank you very much. I have also had this problem with the CONCAT function. Deleting those spaces between 'CONCAT' and '(' worked for me as well.
Thanks.
'look for spaces between the function and the "(" ' - this solved the problem for me also.
thanks man !! thats one of these things that you can spend a whole night stucking your head on the table ;-) you just saved my precious time..
THX mate ! 5 seconds of searching, and i though something is wrong with my pythons library ^^
Post a Comment
If you found this page useful, or you have any feedback, please leave a comment.