$i = $_SESSION['ruserid'];// the list will show the downline for a member with id = 10
prin($i);// calling function prin
function prin($i) //definition
{
$id = $i;
// $q=mysql_query("select id from f2_users where up_id='$id'");
$q = User::where('sponser_id', $i)->get();
$count = count($q);// gives new value each time
foreach ($q as $r) {
$i = $r[0];
echo $i;
echo "<br>";
prin($i); // recursion
}
}
How to convert above php code in laravel controller to get downlines?
Blockquote
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire