i tried this
sql sql2 {
}
sql sql_gowifi{
sql_user_name = "%{sql2:select s.* from (select @user:=BINARY '%{User-Name}' p) parm , upm s}"
}
and using sql_gowifi in sites-enabled/default for mysql based login and accounting
again when using sql_user_name = "%{User-Name}" it saves the username entered in login page of hotspot to radpostauth table but with the code above the username remains blank
when i run the sql query above in mysql server it returns the correct username please help