...def edit_member(no) :
"""
Edit a gang member
"""
print('edit member')
if request.GET.get ('save', '').strip():
edit = request.GET.tas k.strip()
lastname = request.GET.get ('lastname', '').strip()
firstname = request.GET.get ('firstname', '').strip()
birthdate = request.GET.get ('birthdate', '').strip()
deathdate = request.GET.get ('deathdate', '').strip()
address = request.GET.get ('address', '').strip()
city = request.GET.get ('city', '').strip()
state = request.GET.get ('state', '').strip()
zipcode = request.GET.get ('zip', '').strip()
father = request.GET.get ('father', '').strip()
mother = request.GET.get ('mother', '').strip()
gangid = request.GET.get ('gangid', '').strip()
status = request.GET.get ('status', '').strip()
if status == 'open':
status = 1
else:
status = 0
conn = sqlite3.connect ('gang.db')
c = conn.cursor()
c.execute("UPDA TE gangmember set,\
lastname = ?,\
firstname = ?,\
birthdate = ?,\
deathdate = ?,\
address = ?,\
city = ?,\
state = ?,\
zipcode = ?,\
father = ?,\
mother = ?,\
gangid = ?,\
status = ?,\
WHERE id LIKE ?", (lastname, firstname, birthdate, deathdate, address, city, state, zipcode, father, mother, gangid, status))
conn.commit()
return '<p>The item number %s was successfully updated</p>' % no
else:
conn = sqlite3.connect ('gang.db')
c = conn.cursor()
c.execute("SELE CT lastname, status FROM gangmember WHERE id LIKE ?", (str(no),))
cur_data = c.fetchone()
return template('edit_ member', old=cur_data, no=no)
.....
error.... File "gangmember.py" , line 117, in edit_member
WHERE id LIKE ?", (lastname, firstname, birthdate, deathdate, address, city, state, zipcode, father, mother, gangid, status))
OperationalErro r: near ",": syntax error
1 1675 dwblas 626
Recognized Expert Contributor
There should not be a comma here
Also, in the future, post your code between code tags (click on the code button above the box where you post). And paste the complete error message as we have no idea which comma the error is referring to.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Vin |
last post by:
Is it possible to access a function defined in python shell from c-code?
For example if I have defined
>>> def c(x):
.... return x*x
....
and defined in some module foo
|
by: Ricardo Santos |
last post by:
Hi,
I have a Python AST, which I have modified slightly (but still a valid
Python AST). How do I go back to its source code representation?
source code -> AST (POSSIBLE)
AST -> source code (????????)
Can someone point me to an open source solution? I don't want to have
to implement a "pretty printing" AST visitor myself.
|
by: Tran Tuan Anh |
last post by:
Hi all,
I am new to Python and desperated to look for a good Python debugger.
I mean a debugger with source coding tracking. For C/C++, emacs and
gud offers execellent development env. The source code tracking is
extremely useful for recursive functions.
I have spent time Googling but not found anything near.
Thanks!
|
by: Pajo |
last post by:
What should I install so I can connect to sqlite from
Python.
One simple example would be very helpfull.
Thanks,
Pajo
|
by: John Mark Howell |
last post by:
BlankCan anyone give me an idea as to how to use the CodeDom to edit code?
I would like to perform mass changes (such as putting logging messages as
the first statement in all methods with method names) to a system with
hundreds of classes and thousands of methods. I know the CodeDom can allow
you manipulate the code and spit it back out, but I cannot seem to see how
to get it to pull the code into it in the first place.
Any ideas,...
| |
by: mirandacascade |
last post by:
Situation is this:
1) must write application that does the following:
a) creates an xml document, the contents of which, is a request
transaction
b) send xml document to destination; I am assuming that a process
at destination side processes the request and sends back a response
c) the application I'm writing must receive response and then
examine contents of response
2) hope to write client application in python
3) was provided VB code...
|
by: Edward Elliott |
last post by:
This is just anecdotal, but I still find it interesting. Take it for what
it's worth. I'm interested in hearing others' perspectives, just please
don't turn this into a pissing contest.
I'm in the process of converting some old perl programs to python. These
programs use some network code and do a lot of list/dict data processing.
The old ones work fine but are a pain to extend. After two conversions,
the python versions are...
|
by: redefined.horizons |
last post by:
I have been trying to find a way to add a directory to Python's sytem
path on my MS Windows XP computer. I did some searching online, but the
only solution I found involved editing the MS Windows Registry. That
seemed a little to hard core. Is there another easier way to do this?
Thanks,
Scott Huey
|
by: mikhail.savitsky |
last post by:
Hi,
Official Python distro is very stable, with release cycle of around 1
year. However, to include the new version of SQLite, which has a much
shorter release cycle, one has to rebuild the main Python distribution
(to compile with the new SQLite headers) - this is from Python docs.
Therefore, inclusion of PySQLite in Python-2.5.1 distro effectively
shrinks the Python release cycle to that of SQLite. I would not have
minded, except that...
|
by: roryclancy |
last post by:
how do you configure python-idle to color code the code
I've tried going into options and clicked on the highlighter tab and massed around there but i cannot to work
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |