Select Categories Below
Status: Closed Points: 25 Time: 06:59 - Apr 04, 2007
sumit_rai
These commands are used to disconnect a session of a user 'subscriber2' . Please tell me whatever general information you can tell me about these commands. i am a newbie to mysql. mysql radius; select * from radacct where username= 'subscriber2' and AcctstopTime= '0000-00-00 00:00:00'; delete from radacct where username= 'subscriber2' and AcctstopTime= '0000-00-00 00:00:00'; select * from ConnDetails where username= 'subscriber2'; delete from ConnDetails where username= 'subscriber2';
Categories:
Add Categories
When adding more than one category, separate them with commas.
Advertisement
PeterNZ
Date:: Apr 04, 2007
Time:: 15:26
Not knowing your system in detail, I can only comment on the commands themselves and guess what they are used for: "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
Time:: 23:35
We are using a Radius server for providing internet connections to ADSL ( Asymmetric Digital Subscriber Line ) users. We are giving these 4 mysql commands to forcefully disconnect a connected user from the Server. What would happen if we do not give the select commands.. and just give the delete commands. I the select command for viewing certain data from the database.... or is it a prerequisite .. before give delete command.
Time:: 23:37
correction * Is the select command for viewing certain data from the database.... or is it a prerequisite .. before give delete command. ???
Anpanman
Date:: Apr 05, 2007
Time:: 05:03
normally using SQL to delete registries in the database, it is not necessary to select first. The delete is sufficient. I don't know about your specific situation, but it sounds strange that it would be required to select first.
Time:: 09:52
Thanks Anpanman ... your reply has cleared my doubts... .. i believe in our case we were told to use select command before delete command to make sure we dont type the delete command wrong ( that would be dangerous ). First we are giving the select command . if there is some typo in select command it wouldnt do no harm and we can correct it. now when we are sure that the select command is giving correct result, we just replace 'select *' with 'delete' .
Question Answered
This question has been closed, and points have been rewarded to the following experts:
You're welcome however to comment or give additional information or if you wish, you have the ability to write a Tutorial in the Tutorial Area.
Answer this Question
New User
Email:
Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address
Registered User
Username:
Password:
Forgot Your Password?
Enter your email address below and we will resend your login information to you.
Login Information Sent
Questions
how do i open a file dialog in .net (a windows application)?
When trying to alter a table in MySQL, I get "Error on rename... (Errcode: 13)"
how do i delete a top domain cookie from a subdomain?
Hi Am Rakesh, Am generating User Data List, Details Given Below.Please Help Me.
What is some free software for recording the movements on your computer screen t...
Good project management software?
You have 100 characters to use
Rank
Expert
Points
1.
325
2.
310
3.
240
4.
120
5.
95
6.
50
7.
8.
10
9.
Register today to share your knowledge with the community and be recognized and rewarded for your contributions.
Register Here
"Psst, Quomon is a great site. Pass it on." Tell a Friend | Link To Us | Save to Delicious | Digg it
Language Options
English:
Español:
Sponsors
Questions and Answers Software Real Estate Postcards Marketing Fulfillment