Re: Seeking PyGreSQL help

Поиск
Список
Период
Сортировка
От Alastair G. Hogge
Тема Re: Seeking PyGreSQL help
Дата
Msg-id 200308052241.10612.agh@tpg.com.au
обсуждение исходный текст
Ответ на Re: Seeking PyGreSQL help  ("Alastair G. Hogge" <agh@tpg.com.au>)
Ответы Re: Seeking PyGreSQL help  ("D'Arcy J.M. Cain" <darcy@PyGreSQL.org>)
Список 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 по дате отправления:

Предыдущее
От: "Alastair G. Hogge"
Дата:
Сообщение: Re: Seeking PyGreSQL help
Следующее
От: "Alastair G. Hogge"
Дата:
Сообщение: Re: Seeking PyGreSQL help