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

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.

Replies are listed 'Best First'.
Re^5: Having issues with DBI
by perrin (Chancellor) on Dec 11, 2008 at 19:47 UTC
    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?