SQL not a variable
Alan DeKok
aland at deployingradius.com
Tue Apr 30 18:43:05 CEST 2019
On Apr 30, 2019, at 11:58 AM, Nicolas Breuer <Nicolas.Breuer at belcenter.biz> wrote:
>
> Hello,
>
> It's not working...
>
> allocate-find = "SELECT ip_address FROM radippool WHERE (pool_name like '%{reply:Pool-Suffix}*%%' and pool_name not like '%%STATx%%') AND expiry_time < NOW() ORDER BY rand(), pool_name, expiry_time LIMIT 1 FOR UPDATE"
>
> [IP-POOLING-01] expand: SELECT ip_address FROM radippool WHERE (pool_name like '%{reply:Pool-Suffix}*%' and pool_name not like '%STATx%') AND expiry_time < NOW() ORDER BY rand(), pool_name, expiry_time LIMIT 1 FOR UPDATE -> SELECT ip_address FROM radippool WHERE (pool_name like 'BC*%' and pool_name not like '2019-04-30 17:55:08TATx%') AND expiry_time < NOW() ORDER BY rand(), pool_name, expiry_time LIMIT 1 FOR UPDATE
>
> What I'm doing wrong?
Unfortunately, there are two layers of expansion. You'll need to use: %%%%STATx%%%%
Alan DeKok.
More information about the Freeradius-Users
mailing list