Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36135
| From | John Gordon <gordon@panix.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Evaluate postgres boolean field |
| Date | 2013-01-04 19:06 +0000 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <kc798c$79a$1@reader1.panix.com> (permalink) |
| References | <d559ab56-241b-49d0-84fd-ebd0b70426ab@googlegroups.com> |
In <d559ab56-241b-49d0-84fd-ebd0b70426ab@googlegroups.com> andydtaylor@gmail.com writes:
> for row in cursor:
> row_count += 1
> if row[4] = True
> print row[1]
Since row[4] is a boolean value, you should be able to just say:
if row[4]:
print row[1]
--
John Gordon A is for Amy, who fell down the stairs
gordon@panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Evaluate postgres boolean field andydtaylor@gmail.com - 2013-01-04 10:08 -0800
Re: Evaluate postgres boolean field donarb <donarb@nwlink.com> - 2013-01-04 10:50 -0800
Re: Evaluate postgres boolean field John Gordon <gordon@panix.com> - 2013-01-04 19:06 +0000
Re: Evaluate postgres boolean field andydtaylor@gmail.com - 2013-01-05 04:24 -0800
csiph-web