gadfly cgi update

grakker grakker at softhome.net
Sun Jun 24 23:57:22 EDT 2001


OK.  I looked in the FAQ and checked my apache error logs.  Seems that
even though everyone has access to the file, it still has to be in the
www directory.

So anway, disregard this message.



grakker at softhome.net (grakker) wrote in message news:<56817b75.0106241223.4cdf544a at posting.google.com>...
> I'm trying out my first python program this weekend.  I have a
> calendar, which when you click on the day, it opens a window which
> lets you edit information about that day.  The submit calls a script
> which should update the database.  But it doesn't.  It just stops at
> the line.  Here is the code in question (place here the customary
> appologies for ugly code):
> 
> print form_custody_value,
> print form_month_value,
> print form_day_value,
> print form_year_value
> print "'%s'" % form_custody_value
> print "'%s'" % form_notes_value
> 
> db_update = "\"update custody set cstdy='%s', notes='%s' where \ 
>      mnthdt=%d and dydt=%d and yrdt=%d\"" % (form_custody_value, \ 
>      form_notes_value, form_month_value, form_day_value, \
>      form_year_value)
> print db_update
> db.execute(db_update)
> 
> print "updated"
> 
> 
> I have all the print statements in there so that I could see what was
> going on.  Here is the output:
> 
> custody=Lang
> Lang 7 8 2001
> 'Lang'
> 'Birthday'
> "update custody set cstdy='Lang', notes='Birthday' where mnthdt=7 and
> dydt=8 and yrdt=2001"
> 
> 
> This works from the python command line, and very similiar select
> statements work on my other pages.  Any help would be appreciated.
> 
> -Lang
> 
> BTW  Python is pretty sweet if I'm able to get as close as I have in
> one weekend of coding...



More information about the Python-list mailing list