Re: Seeking PyGreSQL help - Mailing list pgsql-interfaces

From Alastair G. Hogge
Subject Re: Seeking PyGreSQL help
Date
Msg-id 200308052241.10612.agh@tpg.com.au
Whole thread Raw
In response to Re: Seeking PyGreSQL help  ("Alastair G. Hogge" <agh@tpg.com.au>)
Responses Re: Seeking PyGreSQL help
List pgsql-interfaces
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.



pgsql-interfaces by date:

Previous
From: "Alastair G. Hogge"
Date:
Subject: Re: Seeking PyGreSQL help
Next
From: "Alastair G. Hogge"
Date:
Subject: Re: Seeking PyGreSQL help