How to use is null in find_in_set in php

I am trying to use IS NULL in query but it is not working for me

code:

‘select * from tbl_user_reg where prof_verify_status=:stat and FIND_IN_SET(age, is null
or age, :agefrom) order by user_id desc’;

can u find any error …?

regards,
Darshan N

This isn’t valid sql:

  and FIND_IN_SET(
    age,
    is null or age,
    :agefrom
  )

A person’s age is not a fixed number, unless they are dead. You should be storing a date of birth and then either calculating the current age or determining a date range in order to find matching data.

Got it,
 
thank you,

Sponsor our Newsletter | Privacy Policy | Terms of Service