"Eko Budiharto" <[EMAIL PROTECTED]> wrote:
> I am trying to find how to use command "select count(*)". I tried it in
> mysql query console, it shows the number of my rows in my table. But
> when I tried it in perl with $sth->do("select count(*) from mytable")
> and run the perl script from DOS console, I always gets "1" in value.
> What is the right way to do it in order to get the number of rows in my
> table in return?
> I am looking forward to a favorable reply from you. Thank you.
print $dbh->selectrow_arrayref("SELECT COUNT(*) FROM mytable")->[0], "\n";
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Egor Egorov
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]