选择相同的ID

I want to select where the same acc_id as the one signed in with is equal Itried //WHERE account_info.acc_id='%s' but it didn't work how can I fix it

When I add it nothing is returned.

When i execute the code without it all the data is returned not only the one with equal acc_id

$postdata = file_get_contents("php://input");
if (isset($postdata)) {
     $request = json_decode($postdata);
     $User_ID = $request->acccid;
     $sql = sprintf("SELECT * FROM account_info
     join todolist on account_info.acc_id = todolist.acc_id
 //WHERE account_info.acc_id='%s'
    ",
       mysqli_real_escape_string($conn,$User_ID));
    $result=$conn->query($sql);
    if ($result->num_rows>0)
    {   
        while($row=$result->fetch_assoc()) 
        {$data[]=$row;
        }

         echo json_encode($data);
    }


}