SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION mysky.holidaycount does not exist (SQL: SELECT *,holidaycount(date_from,date_to) as totaldays FROM leaves where employee_id = 'SLT0001')
I have 3 tabs, add leave, view leave, and leave the list, 3 of them are not working suddenly, before years it was working fine now only one is not working, it shows the error holidaycount function does not exist.
error Facing -
SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION mysky.holidaycount does not exist (SQL: SELECT *,holidaycount(date_from,date_to) as totaldays FROM leaves where employee_id = 'SLT0001')
Check if this function actually exists in the database in the mysql information_schema table:
You can use an SQL query that makes use of the information_schema table. This table contains information about databases, tables, columns, routines (procedures and functions), etc.