Hello ALL

I have Some problem in using Unlang.

I need to call some function in PostgreSQL database send some parameter from request attribute  to it , get replay from function and then change some check attribute  item (such as Pool-Name).or replay  attribute   


Unlang :

cuncurrent-session-status =”{%sql:select public.findout_cuncurrent_sessions_for_a_user(%{request:User-Name},%{request:Acct-Session-Id},%{request:NAS-IP-Address},%{request:NAS-Port})}”;
if (cuncurrent-session-status=='Accept')
{
ok
elseif (cuncurrent-session-status=='Reject')
{
update control 
{Pool-Name='Exceeded-Concurrent-Session'}
}


i know that i have some mistake in script but i can not find where !!!!!