Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Re: Re: I need to tell what I pulled from SQL

by ichimunki (Priest)
on Jul 22, 2002 at 19:54 UTC ( #184209=note: print w/ replies, xml ) Need Help??

in reply to Re: Re: I need to tell what I pulled from SQL
in thread I need to tell what I pulled from SQL

The problems with this method are documented in 'perldoc DBI'. It is probably more reliable than I would be, but to sum it up, $sth->rows is mostly for do() commands like INSERT, DELETE, etc, so that you know how many rows were affected (as those queries don't really have any other results). I also suspect that DBI functionality, although it is supposed to provide a uniform interface, can vary somewhat based on which type of server is used. There might be a MySQL-specific answer to this question, but it probably wouldn't be very portable-- besides, doing COUNT(*) or simply fetching all the data (since, in this case, only a single row seems to be expected), is just going to be quicker than any other solution.
  • Comment on Re: Re: Re: I need to tell what I pulled from SQL

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2016-07-29 03:22 GMT
Find Nodes?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?

    Results (259 votes). Check out past polls.