a more complete version of code from my previous write up ie parsing arrays
Again any help would be greatly appreciated
my $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;
}
thanks
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.