I have a telegram bot that collect telegram channel username,subscriber count and etc.. Now i need to update subscriber count of all telegram channel in my database using telegram api.
see the below code.That only updating first row in database.
if($ex[0] == '/upsubs'){
    $upsubs = mysqli_query($db,"SELECt * FROM channel");
    while($up = mysqli_fetch_assoc($upsubs)){
        $ups = $up['c_name'];
        $content1 =file_get_contents("https://api.telegram.org/bot<API_TOKER>/getChatMembersCount?chat_id=".$ups);
        $obj1 = json_decode($content1, TRUE);
        $subs1 = $obj1['result'];
        mysqli_query($db, "UPDATE channel SET c_subs = '".$subs1."' WHERE c_name = '".$ups."'");
    }
}
 
    