W dniu 2012-05-10 23:28, Waldemar Dymkiewicz napisał(a):
Moze to glupie ale gdzie są dyrektywy "AS"?
Niestety to nie to, zmieniłem zapytania:
authorize_check_query = \ "SELECT n.id AS id , upper(m.mac) AS UserName, 'Cleartext-Password' AS Attribute, passwd AS Value, ':=' AS op \ FROM nodes n \ JOIN macs m ON (m.nodeid = n.id) \ WHERE \ upper(m.mac) = '%{User-Name}' AND n.access=1 ORDER BY n.id"
authorize_reply_query = \ "SELECT n.id AS id, upper(m.mac) AS UserName, 'Framed-IP-Address' AS Attribute, inet_ntoa(n.ipaddr) AS Value, ':=' AS op \ FROM nodes n \ JOIN macs m ON (m.nodeid = n.id) \ WHERE \ upper(m.mac) = '%{User-Name}' \ UNION \ SELECT n.id AS id, upper(m.mac) AS UserName, 'Mikrotik-Rate-Limit' AS Attribute, '1024k/1024k' AS Value, "==" AS op \ FROM nodes n \ JOIN macs m ON (m.nodeid = n.id) \ WHERE \ upper(m.mac) = '%{User-Name}'"
Radius odpowiada tym samym błędem, mimo że zapytania wykonane w mysql zwracają wartości które wydają się być poprawne.
-- ITFan