473,382 Members | 1,733 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,382 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
Aliases:

def delUser():
conn_db()
use = "USE %s" % mysql_db
db_cursor.execute(use)
print "DATABASE ONLINE"
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
db_cursor.execute(del_statement)
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
Aliases"
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:
db_cursor.execute(select_statement)
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
know...

Thank ye once again, This group rocks!

-- Merrigan
Dec 14 '07 #1
0 809

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

Similar topics

1
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...
2
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...
34
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...
3
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...
2
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.