I have a table in my database named visitor_table
. Within table i have a column named visitor_affiliate
. I want to get the count of the rows when visitor_affiliate = "someurer"
.
I want to get the count as number. I already have this code but i don't know how to get the count only for the rows containing the string. I currently get the number of all rows,
$result = mysql_query("SELECT * FROM visitor_table");
$num_rows = mysql_num_rows($result);
echo "$num_rows Rows\n";