in reply to Simple perl script creates a table but no SQL results ..why?

In your _show_bugs subroutine you only call fetchrow_array twice (and then ignore one of them - @array), you have to call it for each row.
A cursory glance spotted that the $sth->finish in subroutine _show_bugs will never get run, since it is after the return. It probably doesn't have a bad effect in this case, but beware of this, you might miss a commit (depending on the database). Also, since you are not retrieving the whole set, you have a memory leak (finish tidies this up).
The return statement iteself seems overly complicated for what it is doing.
There are times when you declare variables and never use them (I am not keen on commonTagsHandler) but I guess you will tidy up the code later ;-)

Update: Yup, I missed the lack of an execute.
  • Comment on Re: Simple perl script creates a table but no SQL results ..why?

Replies are listed 'Best First'.
Re^2: Simple perl script creates a table but no SQL results ..why?
by yoyomonkey (Initiate) on Aug 23, 2006 at 13:28 UTC
    Working now Corion, Cdarke and everyone else . Thank you so much for all the help and hints! your a bunch of stars :) thanks again