You are correct, I can fetch a variable from the Table and then count the number of row found in the results.
However, If I don't need any data from any of the columns in the table, but I still want a count, then it is faster and uses alot less memory to just query the count.
In the mysql daemon on my linux server, at the mysql prompt I enter:
SELECT Count(*) FROM Users;
and this returns just the count (example 328).
I don't need any other data from the table, I don't need user name, address, etc. Just the number of users. Since I don't need all this data it is just faster to not query for it, and just query the count.
I was just wondering if there is a way in PHP to get the raw output from a mysql query (as shown above) and put that in a variable (called Count) without needing to fetch an array of column data that I won't use anyway.
Much thanks.