Answers
Apr 04, 2007 - 12:26 PM
"select * from radacct where username= 'subscriber2' and AcctstopTime= '0000-00-00 00:00:00';"
Selects all data from the table "radacct" (I guess it is Radius Account) for the user "subscriber2" where the AcctstopTime (Account Stop Time?) is set to zero.
(I assume this is used to control that the correct data is selected for the following delete statement!)
"delete from radacct where username= 'subscriber2' and AcctstopTime= '0000-00-00 00:00:00';"
Deletes the data which was selected above from the table "radacct"
"select * from ConnDetails where username= 'subscriber2';"
Selects all data from the table "ConnDetails" (I guess it is Connection Details) for the user "subscriber2" where the AcctstopTime (Account Stop Time?) is set to zero.
(Again I assume this is used to control that the correct data is selected for the following delete statement!)
"delete from ConnDetails where username= 'subscriber2';"
Deletes the data which was selected above from the table "ConnDetails"
I am not sure i n which environment you have these SQL Statements. If they are in a SQL Script, then the output should be
First the data in radacct for the user
Then a statement like "1 row(s) deleted from radacct" or something similar
Then the data for the user in ConnDetails
Then again a message saying something like "1 row(s) deleted from ConnDetails"
If you came across these SQL Statements in some program code then I guess the SELECT is done to collect data to either show on the screen or somewhere or to log the process in some log file etc.
Hope this helps
Cheers
Peter
Apr 04, 2007 - 08:35 PM
Apr 04, 2007 - 08:37 PM
* Is the select command for viewing certain data from the database.... or is it a prerequisite .. before give delete command. ???
Apr 05, 2007 - 02:03 AM
Apr 05, 2007 - 06:52 AM
Aug 10, 2010 - 03:11 AM
Selects all data from the table "radacct" (I guess it is Radius Account) for the user "subscriber2" where the AcctstopTime (Account Stop Time?) is set to zero.
(I assume this is used to control that the correct data is selected for the following delete statement!)
"delete from radacct where username= 'subscriber2' and AcctstopTime= '0000-00-00 00:00:00';"
Deletes the data which was selected above from the table "radacct"
"select * from ConnDetails where username= 'subscriber2';"
Selects all data from the table "ConnDetails" (I guess it is Connection Details) for the user "subscriber2" where the AcctstopTime (Account Stop Time?) is set to zero.
(Again I assume this is used to control that the correct data is selected for the following delete statement!)
"delete from ConnDetails where username= 'subscriber2';"
Deletes the data which was selected above from the table "ConnDetails"
http://www.bjqlsx.cn/
Sep 24, 2010 - 10:15 PM
http://www.neu92.com/
Dec 29, 2010 - 11:16 PM
Add New Comment