I have a table, and that table have 5 entires
I want to count all referrers with same id
I know I am doing something wrong...
Just cant figure it out
Here is what I have :
$query = "SELECT * FROM girlm";
$result = mysql_query($query) or die( "ERROR: " . mysql_error() . "\n");
while ($myrow = mysql_fetch_array($result)) {
$uidc=$myrow["user"];
$referrerc=$myrow["referrer"];
}
$result3 = mysql_query("select * from girlm where referrer='$referrerc'");
$num_rows = mysql_num_rows($result3);
echo "$num_rows<BR>";
for testing purposes, It should echo but it doesnt:
4 with referrer id of 23
1 with referrer id of 16