When I run
select ipaddr, count(*) from weblog group by ipaddr
I get a list of the summation of my ipaddr. For instance, if 127.0.0.1 appeared 5 times, the result would be 1 row.
How can I get the number of rows the query returned instead of the actual list?
I'm trying to count the number of times something appears (w/o duplicates).
Any ideas? It's easy with a while loop in PHP but I would rather just use mysql since I know it can be done. Thanks.
-Dinos
select ipaddr, count(*) from weblog group by ipaddr
I get a list of the summation of my ipaddr. For instance, if 127.0.0.1 appeared 5 times, the result would be 1 row.
How can I get the number of rows the query returned instead of the actual list?
I'm trying to count the number of times something appears (w/o duplicates).
Any ideas? It's easy with a while loop in PHP but I would rather just use mysql since I know it can be done. Thanks.
-Dinos