Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: DBI fetchrow_array stopped working

by mje (Curate)
on May 06, 2014 at 13:30 UTC ( #1085177=note: print w/replies, xml ) Need Help??


in reply to DBI fetchrow_array stopped working

Add use strict and use warnings to your script as I can see mistakes like \$total then $Total used later. Also, why are you passing undef as the first argument to bind? Also, you can just use fetch when columns are bound and not fetchrow_array.

There is something perculiar about your trace. fetchrow_array should return undef if there are no rows but yours is returning '0'. I think you are using scalar context on fetchrow_array and your first or last column is 0. Switch to just calling fetch and the problem should go away.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1085177]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2019-06-18 11:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (81 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!