Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: stupid mistake in DBI code

by fidesachates (Monk)
on Apr 26, 2011 at 16:13 UTC ( [id://901390]=note: print w/replies, xml ) Need Help??


in reply to stupid mistake in DBI code

If I had to guess, you're not executing the execute command in your else clause. Looking at it, you're going through an array and as long as the element in the array does not equal '', you're executing. However, what if the array never holds anything? The array is being based off of
foreach my $rec (sort(keys(%workOrder)) { @workOrders=@{$workOrder{$rec}}; }
Your code doesn't assign any value to the hash workOrder so I imagine the array workOrders is also empty. Do a print before your execute to see if the code ever enters the else block.

Update:
Standard things: use strictures, use warnings, and use more distinct variable names. I don't think I am correct about your problem.
Check the DBI->connect() and $dbhST->prepare() succeeded

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://901390]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-25 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found