I've seemed to have narrowed down the problem to $sth variable, I guess I can't 
declare this as a private variable because it "prepares" it and needs to have it at 
least local or global to access it?
  Rob Roudebush <[EMAIL PROTECTED]> wrote: 
I think pulling the ID field may be causing the problem with use strict; ?

$dbh = DBI->connect( "DBI:mysql:turnover", "root", "", {RaiseError => 1, AutoCommit => 
0});
$sth = $dbh->do( "insert into maintenance (owner, email, maintype, title, requested, 
engineer, ticket, impact, comm
, dispo, dispodate, action, sponname, sponop, sponcp, sponp, conname, conop, concp, 
conp, partname, partop, partcp,
partp, manname, manop, mancp, manp, dbaname, dbaop, dbacp, dbap, engname, engop, 
engcp, engp, mainname, mainop, ma
incp, mainp, process, rollback, closeout, datetime, purpose, risk, saname, saop, sacp, 
sap, total, pending, countin
g) values ('$owner', '@names', '$maintype', '$title', '$requested', '$engineer', 
'$ticket', '$impact', '$comm', '$d
ispo', '$dispodate', '$action', '$sponname', '$sponop', '$sponcp', '$sponp', 
'$conname', '$conop', '$concp', '$conp
', '$partname', '$partop', '$partcp', '$partp', '$manname', '$manop', '$mancp', 
'$manp', '$dbaname', '$dbaop', '$db
acp', '$dbap', '$engname', '$engop', '$engcp', '$engp', '$mainname', '$mainop', 
'$maincp', '$mainp', '$process', '$
rollback', '$closeout', '$datetime', '$purpose', '$risk', '$saname', '$saop', '$sacp', 
'$sap', '$total', '$pending'
, '$counting')");
$sth = $dbh->prepare("select ID from maintenance");
$sth->execute();
while ($ref = $sth->fetchrow_hashref()){
$ID = $ref->{'ID'};}
$dbh->disconnect;

Mark Bergeron wrote: Rob,
use strict; shouldn't really affect the syntax of any DBI handle or statement. I would 
help if you included an example for us to have look at here.

-----Original Message-----
From: "Rob Roudebush"
To: [EMAIL PROTECTED]
Date: Mon Apr 29 18:15:23 PDT 2002
Subject: Using strict with DBI

>
> For some reason the DBI part of my code doesn't work with strict - is this a 
>limitation or am I doing something wrong - I declare my variables as my or private - 
>my $sth = DBI->...
>
>Another question how can I test my script at the command line with -w if it is 
>interactive? Or how do I push warnings to browser?
>
>-Rob
>
>
>
>
>---------------------------------
>Do You Yahoo!?
>Yahoo! Health - your guide to health and wellness


___________________________________________________
GO.com Mail 
Get Your Free, Private E-mail at http://mail.go.com



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness


---------------------------------
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness

Reply via email to