Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: need help in searching arrayrefs

by cchampion (Curate)
on Feb 13, 2004 at 01:48 UTC ( #328706=note: print w/ replies, xml ) Need Help??


in reply to need help in searching arrayrefs

There are three things that I noticed and maybe they could make a difference:

  • selectcol_arrayref and selectall_arrayref return an array reference. You are assigning their return value to an array
  • After you assign to @row the value of a fetch, you assign something else, without using that result. Moreover, your second "my @row" declaration will hide the first one. If you use warnings, it will tell you straight away.
  • You are using "select max(word_id)" to get a count. This will work as long as you don't delete any record in your table. You should use "COUNT(*)" instead.

I don't know if these items are responsible for what you are complaining about, but surely they look suspicious.

HTH


Comment on Re: need help in searching arrayrefs

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2015-07-05 06:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls