Hi, I need something like recursion wherein the query repeats itself using it's result to start the NEXT - SAME - QUERY.
I made 1 but it just simple reecho the same result.
// KUNIN ANG ID NI KURIMAW
$root = $_GET['id'];
$result = mysql_query("SELECT COUNT(*) as count, id, sponsor FROM agents WHERE sponsor = '$sponsor'")
or die(mysql_error());
while ($row = mysql_fetch_array($result)){
$sponsor = $row['id'];
// RIGHT HERE, IWANT TO REPEAT THE SAME QUERY USING THE "RESULT $SPONSOR" IN THE NEXT WHERE STATEMENT
}
Thanks a lot geeks!