Link to home
Start Free TrialLog in
Avatar of badr s
badr s

asked on

error problem with 1582 Incorrect parameter count in the call to native function 'ISNULL'

hello everyone
i have 2 tables one (visits) and other one (patients) with relationship by mysql (patients) is with PK as and as index
and i wanted to use code in my app to get the last datetime record to check the patient if still inside the hospital admitted or discharge
so far i have this code with help of you guys
SELECT,MAX(ISNULL(b.sdat,'1901-01-01')),MAX(ISNULL(b.edat,'1901-01-01')) from patients a left join visits b on Where ddatediff(now(),b.edat) <=365 group by

Open in new window

but when i execute in sql builder using php myadmin  or another app i get error
(1582 - Incorrect parameter count in the call to native function 'ISNULL')
i tried to find out the error cause but no luck until now
Avatar of CompProbSolv
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of badr s
badr s


thank you so much  bro worked :)  
i will just try next step to put in if condition in my i hope i can figure it out
thank you again