Re: Seeking PyGreSQL help

From: "Alastair G(dot) Hogge" <agh(at)tpg(dot)com(dot)au>
To: darcy(at)PyGreSQL(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Seeking PyGreSQL help
Date: 2003-08-05 12:41:10
Message-ID: 200308052241.10612.agh@tpg.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message D'Arcy J.M. Cain 2003-08-05 12:42:32 Re: Seeking PyGreSQL help
Previous Message Alastair G. Hogge 2003-08-05 10:09:47 Re: Seeking PyGreSQL help