halfcountplus has asked for the wisdom of the Perl Monks concerning the following question:
As stated, using the exact same query via psql (CLI to postresql) yields the entire table, not just half of it. There is no error thrown, but I do get this#!/usr/bin/perl -w use strict; use warnings FATAL => qw(all); use DBI; my $DBH = DBI->connect("DBI:Pg:dbname=inxay","hombre", 0, { 'RaiseErro +r'=>1 } ) || die "DBI connect failed: $!"; my @Names; my $q = $DBH->prepare("SELECT name FROM directory_project"); $q->execute(); while (my $n = $q->fetchrow_array()) { push @Names,$n } my $e = $q->err; print $e if ($e); print $#Names."\n"; $DBH->disconnect || warn $DBH->errstr;
What's up? I had assumed up to now that DBI was rock solid stuff. 6500 strings is nothing...
Never mind gang, that column was blank at that point in the table, which I presumed it could not be, ha ha.20100422 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI doesn't return all rows!
by ikegami (Patriarch) on Apr 21, 2010 at 20:52 UTC |