Ciao...veramente quelle query le devo usare su freeradius e la vuole nella seguente forma:
1° query:
postauth_query = "INSERT into ${postauth_table} (id, user, pass, reply, date) values ('', '%{User-Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}', NOW())"
Query ke voglio eseguire pure insieme a quella:
INSERT into ${authcheck_table} (UserName, Attribute, op, Value) VALUES ('%{SQL-User-Name}'', 'Calling-Station-Id', ':=', '%{Calling-Station-Id}')
provando così mi da un errore il mysql:
postauth_query = "INSERT into ${postauth_table} (id, user, pass, reply, date) values ('', '%{User-Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}', NOW());INSERT into ${authcheck_table} (UserName, Attribute, op, Value) VALUES ('%{SQL-User-Name}'', 'Calling-Station-Id', ':=', '%{Calling-Station-Id}')"
e mi kiedevo se esisteva una funzione nativa che mi permettesse di inviarle entrambe su una riga
errore:
rlm_sql (sql) in sql_postauth: Database query error - 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 '; INSERT into radcheck (UserName, Attribute, op, Value) VALUES ('test'', 'Calli' at line 1


Rispondi quotando