Re: I'm very confused.

Поиск
Список
Период
Сортировка
От Brant Fitzsimmons
Тема Re: I'm very confused.
Дата
Msg-id 45ADD921.3030800@bfcomputerconsulting.com
обсуждение исходный текст
Ответ на Re: I'm very confused.  ("Jasbinder Singh Bali" <jsbali@gmail.com>)
Ответы Re: I'm very confused.
Список pgsql-novice
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jasbinder Singh Bali wrote:
> Please attach a snippet of your python script and lets see what are
>  you doing there. That might make things easy. Jas

Here is the entire test script:

#!/usr/bin/python

# import pgdb module
import pgdb

# connect to the db
db = pgdb.connect(host="localhost", database="test", user="postgres",
password="**********")

# instantiate cursor
cursor = db.cursor()

# insert 10 records
for x in range(10):
    cursor.execute("INSERT INTO users (username, firstname, lastname,
email, age) VALUES ('brant', 'Brant', 'Fitzsimmons',
'brant@bfcomputerconsulting.com', 31)")

# retrieve the data
cursor.execute("SELECT * FROM users")
result = cursor.fetchall()

# print data to the screen
for line in result:
    print line
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFrdkhDpzwx2t8E5gRAiPpAJ0QHGmawHqiZWy2NKTUbWncrpWWGgCdF3oS
IjwEPfhuuvIthx4U8MsoyHA=
=lvc7
-----END PGP SIGNATURE-----

В списке pgsql-novice по дате отправления:

Предыдущее
От: Brant Fitzsimmons
Дата:
Сообщение: Re: I'm very confused.
Следующее
От: Sean Davis
Дата:
Сообщение: Re: I'm very confused.