Some things I found...
2. You are using $CONTROL = $data[2] when you do the split but in your $sth statement you try to select where control = $Control $CONTROL does NOT equal $Control.
3. Your logic seems a little confusing, you are saying in the unless($matches) { that if you get no matches you will then update. That seems backwards what can you update if you get NO match and if you DO get a match you will then insert..?
4. As Enlil says you disconnect before you run the do
Some good node can be found here at the Monastery talking about SQL queries etc here are a few I found interesting
Added: You also might like to change
to something likeif (-e "v:/tf_out.txt") { } else { die "File does not exist\n"; }
-----unless (-e "v:/tf_out.txt") { die "File does not exist\n"; }
In reply to Re: Errors in Code
by AcidHawk
in thread Errors in Code
by SamueD2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |