I need to count the number of rows found in my results. Like 32 matches found. Thanks
using MySQL ?
yes I am.
$query = "SELECT * FROM $userstable WHERE whatever"; $query_result_handle = mysql_query ($query) or die ('topic=The requested table or database does not exist');
$num_of_rows = mysql_num_rows($query_result_handle)
'topic=The requested table or database does not exist'
I have seldom seen a worse error description that this one...
Another alternative would be to select count(*) from tblName. -Rick
thanks, i strive for the worst.
You're on the right track 🙂
Small note: If you use this query, you will get the number of rows as a query-result, so you must run mysql_fetch_row() to get it.