in reply to Re^2: Having issues with DBI
in thread Having issues with DBI

That error just says that PrintErrors is not a valid setting for DBI. It should be PrintError.

If you want to solve this, you need to follow some of the advice you're getting. Check the return value from connect(), add strict and warnings. Also, where are you getting your @colors from? I think this is not your real code. Are you reading it from another statement handle, also stored in a variable called $sth?

Replies are listed 'Best First'.
Re^4: Having issues with DBI
by zoophagous (Novice) on Dec 11, 2008 at 19:16 UTC
    Thanks!

    Check the return value from connect(): - will do.

    add strict and warnings: Have had these on the whole time. Always good practice :) Which is why I found it so odd that it was failing silently.

    where are you getting your @colors from?: A big nasty text document. It has a few thousand entries in a semi-normalized format. One of the attributes of each entry is a pipe delimited field which is put into an array. The point though is that @color isn't from another $sth. Though I do have other $sth in the script. Is there a risk from reusing this? Something I should do to ensure this functions as expected?

    Thanks again for the help, I am a n00b when it comes to perl I am grateful for the patience and guidance.
      Reusing variables is not an issue if you no longer need the old one. I thought you might be clobbering an $sth that makes the loop run because you say that when you comment out the part that sets $sth, the loop goes through.
        Looping back on this as I still haven't fixed this problem.

        I have done a bit more work and found out more.

        I can connect to every table in my db. In fact I can UPDATE and INSERT into the table in question - but every SELECT statement fails silently. And to make things more interesting all the selects work fine if I access the db through a different mechanism, ie phpMyAdmin.

        Any ideas?