> > I've been lurking for a few months and figured I'd pose a question > > that I've been banging my head against for a while. > > (I've already told this in another thread today: > Don't do this, it hurts :-)
How else am I going to get a break-through? > > > If anyone can recommend a good resource for DBI information I would > > be eternally grateful. > > Book: > <http://www.oreilly.com/catalog/perldbi> 7.) Books cost money that starving students like me need for a) food. b) housing. c) beer. (Circle only the best answer.) > > Introductory web article > > <http://www.perl.com/pub/a/1999/10/DBI.html> > Looks good. The perldoc pages aren't too bad either. I was surprised that the Cookbook didn't have more recipies (or better explained ones) on this subject. > > About your code. Did you slap on 'use strict;' afterwards? > Your code doesn't compile under strict. You have two > undeclared variables > ($sth and @row). > I copied and pasted the code (deleting the commentary) right out of the "Outline Usage" section of the perldoc. When it didn't compile, I commented out use strict and then it ran fine (aside from the messages I posted below). Before I sent it to the list I thought "gee, why did I comment that out?" uncommented it, ran it once to make sure it still compiled and fired it off. I would guess that I must have forgotten to save it before compiling. (Whoops.) > > [... code snipped ...] > > > Use of uninitialized value in join or string at sqltest.pl line 11. > > 1 name t 0 0 0000-00-00 0000-00-00 0 0 cruise 0 > > You have a NULL value somewhere in your fetched record. Perl > translates > this to undef, so one of the elements in @row is undef. Hence the > uninitialized value (print "@row" is essentially a 'print join " ", > @row;') > Ahhh! Thanks. > > 0 rows (19: fetch() without execute()) > > DBD::mysql::st fetch failed: fetch() without execute() at > > C:/Perl/site/lib/DBI.pm line 830. > > fetch() without execute() > > 'dump_results' needs to fetch records behind the scenes, so > you have to > execute your statement handle again, because you already > exhausted it in > your while-loop. > No idea why it was included in the Outline Usage. Maybe I should forward a copy of this thread to whoever maintains that page? Thanks, -pvh > -- > felix > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]