473,230 Members | 1,644 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,230 software developers and data experts.

Data Manipulation?

Hi There,

I Posted a while ago about a challenge I had in splitting an E-Mail
adress up to use it. Anyways, the same script but different issue.
Some Background:

The script is going to be used to manage a Virtual User Based E-Mail
system. Now the part I'm struggling with is to delete the E-Mail
address from the database, and then giving the user the option to
DELETE and/or modify any E-Mail Aliases associated to the Deleted E-
Mail Address.

The delete code up to this stage only gives me a list of associated

def delUser():
use = "USE %s" % mysql_db
e_mail = raw_input("Please Provide a the E-Mail Address you wish to
Delete: ")
del_statement = "DELETE FROM users WHERE email = '%s';" % e_mail
un_dom = e_mail.split("@")
username = un_dom[0]
domain = un_dom[1]
domdir = maildir + '%s' % domain
os.rmdir(domdir + '/' + username + '/' + 'cur')
os.rmdir(domdir + '/' + username + '/' + 'new')
os.rmdir(domdir + '/' + username + '/' + 'tmp')
os.rmdir(domdir + '/' + username)
print "User Removed from Database. Now Proceding To associated E-Mail
select_statement = "SELECT source, destination FROM mail.forwardings
WHERE destination = '%s'" % e_mail
result = db_cursor.execute(select_statement)
if result >= 1:
aliasLine = 0
number = result - 1
while aliasLine <= number:
answer = db_cursor.fetchall()
answer_1 = answer[aliasLine]
aliasLine = aliasLine + 1
print '%s is still linked to %s, do you wish to remove the E-Mail
Alias?' % (answer_1[0], answer_1[1])

How can I now get this to give me the options to delete an adress, or
everything, or delete one and modify the rest...or all that you

Thank ye once again, This group rocks!

-- Merrigan
Dec 14 '07 #1
0 803

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Ferran Foz | last post by:
Hello, I'm using ADODB.Stream to open a binary file on the server and write it down to the browser using Response.BinaryWrite. It's working fine, but i need to make some changes to the binary...
by: ajay | last post by:
Hi I need to read data from flat files in memory and execute SQL query on the in-memory data. I do not have an option of using a database and I am using c# .Net to build my application. Does...
by: Jeff | last post by:
For years I have been using VBA extensively for updating data to tables after processing. By this I mean if I had to do some intensive processing that resulted in data in temp tables, I would have...
by: Ben R. | last post by:
Since the original thread is marked as answered, I thought I'd post here to ensure visibility. Hi John and Steven, I'm going the dataset route as access doesn't seem to be too keen on that...
by: Mike Cain | last post by:
Hi, The Repeater control seems like exactly what I want to output rows of data from my database. However I need to do some manipulation to the data prior to it being output and I'm not...
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.