Druga sprawa grupy radiusa powinny byc zachowane, wtedy byc moze udalo by sie zrobic widok radcheck i inne bo w authorize_check, powinno sie zwraacac tylko username i password, reszta powinna byc trzymana w groupach, kolejna sprawa zapytanie zwraca User-Password, wystarczy samo Password
trzecia sprawa twoje zapytanie z authorize_check_query zwraca mi bład, jak zadam je z palca bazie: SELECT id, lower(name) as UserName , 'User-Password' as Attribute , passwd as Value, '==' as op FROM nodes WHERE name = 'GACEK-PC' UNION SELECT id, lower(name) as UserName , 'Simultaneous-Use' as Attribute, '1' as Value, ':=' as op FROM nodes WHERE name = 'GACEK-PC' UNION SELECT 0 AS id, 'GACEK-PC' AS UserName, 'Max-Octets' AS Attribute, CONCAT(ROUND(COALESCE(x.dlimit, y.dlimit))) AS Value, ':=' AS op FROM (SELECT n.id, MIN(n.name) AS name, SUM(t.dlimit/o.cnt) AS dlimit FROM nodeassignments na JOIN assignments a ON (na.assignmentid = a.id) JOIN tariffs t ON (a.tariffid = t.id) JOIN nodes n ON (na.nodeid = n.id) JOIN (SELECT assignmentid, COUNT(*) AS cnt FROM nodeassignments GROUP BY assignmentid) o ON (o.assignmentid = na.assignmentid)WHERE (a.datefrom <= unix_timestamp() OR a.datefrom = 0) AND (a.dateto > nix_timestamp() OR a.dateto = 0) AND a.suspended = 0 AND n.name = 'GACEK-PC' GROUP BY n.id) x RIGHT JOIN (SELECT SUM(t.dlimit)/o.cnt AS dlimit FROM assignments a JOIN tariffs t ON (a.tariffid = t.id) JOIN nodes n ON (a.customerid = n.ownerid) JOIN (SELECT COUNT(*) AS cnt, ownerid FROM nodes WHERE NOT EXISTS(SELECT 1 FROM nodeassignments, assignments a WHERE assignmentid = a.id AND nodeid = nodes.id AND a.suspended = 0 AND (a.dateto > unix_timestamp() OR a.dateto = 0)) GROUP BY ownerid) o ON (o.ownerid = n.ownerid) WHERE (a.datefrom <= unix_timestamp() OR a.datefrom = 0) AND (a.dateto > unix_timestamp() OR a.dateto = 0) AND a.suspended = 0 AND t.dlimit != '0' AND NOT EXISTS (SELECT 1 FROM nodeassignments WHERE assignmentid = a.id) AND n.name = 'GACEK-PC' GROUP BY n.id) y ON (1=1);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' AND n.name = 'GACEK-PC' GROUP BY n.id) y ON (1=1)' at line 1
Pozdrawiam :)
O to wtym chodzi, bez beta testerow programisci byli by nikim ;)
!DSPAM:49bbbb41163611614647931!