X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXSql%2FSQLite.pm;h=2330837f41cd4b2192dc2821f926ff917c00653b;hb=74a756eeda9aaf5732589bea9dd75371b0cb35e0;hp=14eb0621f96e85bbc3805daecd1200850041e168;hpb=a340e9dd6b1ae78d33beeea79d317153bc028b85;p=spider.git diff --git a/perl/DXSql/SQLite.pm b/perl/DXSql/SQLite.pm index 14eb0621..2330837f 100644 --- a/perl/DXSql/SQLite.pm +++ b/perl/DXSql/SQLite.pm @@ -36,7 +36,7 @@ sub has_ipaddr my $sth = $self->prepare($s); $sth->execute; while (my @t = $sth->fetchrow_array) { - if ($t[0] eq 'ipaddr') { + if ($t[1] eq 'ipaddr') { $sth->finish; return 1; } @@ -48,7 +48,7 @@ sub has_ipaddr sub add_ipaddr { my $self = shift; - my $s = q(alter table spot add column ipaddr varchar(40)); + my $s = q(alter table spot add column ipaddr text); $self->do($s); }