jasmine has asked for the wisdom of the Perl Monks concerning the following question:
thanksmy $dbh = DBI->connect("DBI:Sybase:CRAP", "sa", ""); #connects to $sth4 = $dbh->prepare(qq{ SELECT NSS.dbo.SITE.SITE_#, SITE_NAME FROM NSS.dbo.SITE, NSS.dbo.SITE_CONTACT, NSS.d +bo.CONTACT WHERE NSS.dbo.SITE.SITE_# = NSS.dbo.SITE_CONTA +CT.SITE_# AND NSS.dbo.CONTACT.CONTACT_# = NSS.dbo.SITE_C +ONTACT.CONTACT_# AND NSS.dbo.CONTACT.CONTACT_# = $in{$modConta +ctNumber} }) or die "Can't prepare SQL statement: $DBI::errst +r\n"; $sth4->execute or die "Can't execute: $DBI::errstr\n"; my ($newSiteNumber, $newSiteName); $sth4->bind_columns (undef, \$newSiteNumber, \$newSiteName); @array=split( " ", $sites); $count = 0; while ( @row4 = $sth4->fetchrow() ) { if (($newSiteNumber) eq ($array[$count])) { print "modify"; } else { print "delete"; } $count = ++$count; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parsing Arrays II
by chromatic (Archbishop) on Dec 20, 2000 at 09:56 UTC | |
by jasmine (Initiate) on Dec 20, 2000 at 10:13 UTC | |
by jasmine (Initiate) on Dec 20, 2000 at 11:43 UTC | |
|
Re: Parsing Arrays II
by chipmunk (Parson) on Dec 20, 2000 at 09:58 UTC | |
|
Re: Parsing Arrays II
by a (Friar) on Dec 20, 2000 at 09:54 UTC |