On Wed, Mar 23, 2011 at 9:58 AM, 魏景鹏 <[email protected]> wrote: > Dear all, > > How to execute insert, update, delete statments in unlang? > > if I set > > %{sql:delete....} > > freeradius can't interpret the configure file correctly. > > if I set > > Tmp-String-0 := %{sql:delete...} > > the output of 'radiusd -X' shows there's some problem since the > statement don't return any value.
If your query is fixed, a workaround will be to create a function in mysql, which you can set to return something in the end. If your query is arbitrary, you might be able to use prepared statement inside the function. There's an example for prepared statement inside a procedure: http://forums.mysql.com/read.php?60,27979,30437#msg-30437 . Using it inside a function should be similar. -- Fajar - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

