(RADIATOR) sql prepare & execute

S H A N shanali at magix.com.sg
Wed May 19 06:49:28 CDT 2004


hi,
	
	currently my code is using the following approach...

my $query = "INSERT INTO BOD1500 (USERNAME, NAS_REAL_PORT, NAS_PORT, SPEED, NAS_ID, TIMESTAMP) VALUES ('$user', '$nas_real_port', '$nas_port', '${speed}${profile}', '$nas_id', NOW())";
my $sth = $authby_handle->prepareAndExecute($query);

	which is being called from a hook for each radius ACCEPT packet

	i am looking to prepare the querry once but want to execute it repeatedly such as evident from the below method instead of calling prepareAndExecute everytime.

$insert_mrtg=$DBconn->prepare('insert into mrtg (node_ip, date_time, avg_in, avg_out, max_in, max_out) values (?, to_date(?, \'YYYYMMDD HH24:MI:SS\'), ?, ?, ?, ?)
')

while ( 1)
{
	$insert_mrtg->execute($_, $datetimestamp, $line[1], $line[2], $line[3], $line[4] )
}

	how best can i do the same in radiator?

thanks

S H A N

--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list