From: Alastair G. Hogge <agh@tpg.com.au>
To: darcy@PyGreSQL.org
To: pgsql-interfaces@postgresql.org
Subject: Re: Seeking PyGreSQL help
Date: Tue, 5 Aug 2003 22:41:10 +1000
Message-ID: <200308052241.10612.agh@tpg.com.au> (raw)
In-Reply-To: <200308052009.47746.agh@tpg.com.au>
References: <200308051816.06256.agh@tpg.com.au>
<200308050510.39725.darcy@PyGreSQL.org>
<200308052009.47746.agh@tpg.com.au>
On Tuesday, 05 August 2003 20:09, Alastair G. Hogge wrote:
OK, I've found my problem.
my code:
form = cgi.FieldStorage() # Grab data from web page form
db = _pg.connect("mydb", "myhost") # connect to database
temp = form['name'].value
db.query("INSERT INTO test VALUES (temp, 'none')")
db.close()
The following is to show that data has been recived from the web form.
Which works. temp will display what ever I type in the form, however, when I
try to store it in the database above I get problems.
print "Content-Type: text/html\n\n"
print temp
"db.query("INSERT INTO test VALUES (temp, 'none')")" is the line causing the
problem. The internel server error from apache.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: agh@tpg.com.au, darcy@PyGreSQL.org
Subject: Re: Seeking PyGreSQL help
In-Reply-To: <200308052241.10612.agh@tpg.com.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox