Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Rows Count Issue Help!

by fisher (Priest)
on Jan 20, 2011 at 16:35 UTC ( [id://883362]=note: print w/replies, xml ) Need Help??


in reply to Rows Count Issue Help!

try this:
$sth = $dbh->prepare("select count(distinct all_id) as a from users") +or die ("Error in SQL\n"); $sth->execute(); my $counts = $sth->fetchrow_hashref(); print "There are ".$counts->{'a'}." in this table";
fetchrow_hashref() fetches the next row of data and returns it as a reference to a hash containing field name and field value pairs.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (8)
As of 2024-04-23 17:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found